I am building a Chrome Packaged App, where according to CSP I am not allowed to use eval() method. Now since I'm using JQuery (version 1.10.2) and AngularJS (version 1.0.6), one of the library method calls JQuery globalEval internally. (globalEval calls eval internally, which can not be used in this context)
Has anyone come across the same issue? Any workaround other than re-engineering JQuery/AngularJS library method?
Both angular and jquery works with CSP without any problems. But angular needs extra configuration for this :ngCsp
In short, you will have to add ng-csp
directive to the <html>
tag. This will tell angular that CSP is enabled, and it will not try to do things forbidden by CSP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With