我在IntelliJ和Play Framework中创建了一个Angular2应用程序。下面的代码是给错误system.import脚本没有在Angular中执行
<script>
System.import('assets/app/main.js').catch(function(err){ console.error(err); });
</script>
错误: Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-ol8t6QICwIETK9dhrEwBShFCgKGwmDHZW/nmyLH+rYs='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
仍然是同样的错误 - 错误:拒绝评估字符串为JavaScript,因为'unsafe-eval'不是下面内容安全策略指令允许的脚本源:“default-src'self'”。 实例化http:// localhost:9000/assets/app/main.js' –