Using Angular 2 in Chrome packaged app

Viewed 2225

I'm trying to create a chrome packaged app using Angular 2. But I'm getting the following error when I try to run my app:

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' blob: filesystem: chrome-extension-resource

-> Evaluating chrome-extension://aabbecghjjmmpbagelfmhllgaidcbnmn/app/boot.js

The content of boot.js is:

System.config({ packages: { app: { format: 'register', defaultExtension: 'js', "defaultJSExtensions": true, } } });
System.import('app/boot').then(null, console.error.bind(console));

I know AngularJS (angular 1) had an ng-csp directive to fix this Content Security Policy error. Is there something similair for Angular 2?

Is there a way to run Angular 2 in a packaged app?

4 Answers
Related