Angular Error I Dont Understand?
I am trying to build the Menu that is here: http://jsfiddle.net/1vgcs4we/ However when i implement it into my project i get the following error message: Syntax Error: Token 'node.c
Solution 1:
The problem is you are using ng-bind-html-unsafe
which has been deprecated form Angular 1.2+, you should replace it with ng-bind-html
then you need to sanitize that html using $sce
service using $sce.trustedAsHtml
method.
For that you should write your custom filter and apply that filter wherever you want display an HTML
app.filter('unsafe', function($sce) {
return$sce.trustAsHtml;
});
Then in your html it would be used as ng-bind-html="node.text| unsafe"
Solution 2:
I fixed the issue by adding a {{node.text}} into the link, as there was nothing there i didnt think of checking that since it was working somehow on the fiddle.
Post a Comment for "Angular Error I Dont Understand?"