Issue
I'm developing a project in angular 1.2, I have a problem with utf-8 encoding and the angular binding, some chars like "ñ" throw an error:
HTML
<select class="form-control " ng-model="IdDesempeño">
Angular error
Lexer Error: Unexpected next character
I've got a plunker demo
Do you have any idea what's going on?
Solution
You could wider the range of characters allowed in AngularJs identifiers to match your requirements. This is done by modifying the isIdent
function in angular.js
file, around line 9730. I did this to allow French special characters and some more.
isIdent: function(ch) {
return ('a' <= ch && ch <= 'z' ||
'A' <= ch && ch <= 'Z' ||
'_' === ch || ch === '$') ||
129 <= ch.charCodeAt(0) && ch.charCodeAt(0) <= 496; // added this line
There is an old pull request on Github for this (https://github.com/angular/angular.js/pull/4747).
Answered By - mercibe
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.