-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Lexer support "@" character - used in email addresses and others - v 1.2.16 #7469
Comments
I'm confused. Isn't the lexer for parsing angular / Javascript expressions? Where would a @ come into play there? |
A watch on an object with an email address used as user and name fields Uncaught Error: Lexer Error: Unexpected next character at columns 16-16 [@] in expression [[email protected]]. angular.js:6489 function setUpSyncObject(scope, name, defaultValue, afterLoadCallback) { var obj = { syncObject[name] = new SyncObject(obj, widget, afterLoadCallback); |
@pdinadk you can use |
Thanks, caitp. Can you point me to where you think it would work with the parser? Not clear where you mean to use it as you described. |
$scope.object = {
'[email protected]': false,
'[email protected]': false
};
$scope.$watch('object["[email protected]"]', listener);
function listener(newVal, oldVal) {
// do something
} |
Aha, ok Thanks! thought you meant the $watch, but was not sure. |
I'm going to close this as "working as expected." |
Same issue when parsing a string using angular-ui tooltip-html, do I have to open an issue there? I think it comes from angular $parse |
that's just not a valid expression syntax, @jdenquin. You probably want |
I have this: I even escaped the @ sign to @, but that didn't help, of course I get the same error without escape. At last I came to a conclusion, that using " (escape of " sign) in this way: will work. |
@SylwesterKogowski, this is because the browser will unescape |
Email address contains "@"
Uncaught Error: Lexer Error: Unexpected next character at columns 16-16 [@] in expression
This problem has been around for quite a while, really cannot get around this issue.
Thanks!
The text was updated successfully, but these errors were encountered: