-
Notifications
You must be signed in to change notification settings - Fork 48
Angular error when eval - within chrome extension. #13
Comments
Hi @JohnRSim. Thanks for report. To allow unsafe-eval, include |
Thanks Maqsim; I tried setting the content_security_policy but I get this message - I'm going to take a look at sandboxing - http://developer.chrome.com/apps/sandboxingEval.html |
Hi @JohnRSim . Here is a bug report on Chromium stating that |
did u find any solution ? |
@pratiklodha95 I had no issues running the up-to-date version of ngSeed inside chrome extension. Through you need to extract script from index.html to the file, and don't forget to enable Content Security Policy mode for angular: http://stackoverflow.com/questions/11336969/using-angularjs-in-a-google-chrome-extension |
I thought it would be interesting to see how this would run within Chrome extension it almost works apart from issue with a partial not rendering correctly -
Running in Chrome / firefox works fine but in an extension
I get this error -
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
angular.js:10236
EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:".
This is an example of the generated output you can see the partial is being written every time I click back to it.
Not sure if this is an issue with angular but thought it was worth posting here :)
Thanks for the great blog post of using requirejs with angular.
The text was updated successfully, but these errors were encountered: