Issue
My HTML has a div with id="chart_100%views". When I say angular.element("#chart_100%views"), I get the following error
I am using angularJS 1.5.8. It works when special characters are removed. Is there a way to get around with special characters?
Solution
angular.element(), used JQlite behind the scene, SO if you are trying to access an element which has "ID" with special character, then it will fail for sure.
Solution to your question is :
var test = document.getElementById('chart_100%views');
console.log( angular.element(test) );
Answered By - Kusum Kushwaha
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.