Reputation: 101
Here is my code
<a ui-sref="exeprofile({pname:@event})"></a>
there is a '@' in the paramater ,so I get error tips like this
'Error: [$parse:lexerr] Lexer Error: Unexpected next character at columns 7-7 [@] in expression [{pname:@event}].'
I'm confused about how to pass @event
.
Upvotes: 2
Views: 590
Reputation: 123861
The @
is not valid sign for JavaScript variables naming: Valid JavaScript variable names
So I expect, that @event
is a string value..., then this should work:
<a ui-sref="exeprofile({pname:'@event'})"></a>
Upvotes: 1