title: AngularJS uses eval in chrome extension
body: <p>The lates AngularJS (1.3 beta 19) uses <code>eval</code>. This is prohibited in chrome extionsion.</p>
  
  <p>How to fix the issue <strong><a href="https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval" rel="nofollow">without allowing evals</a></strong>?</p>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>Refused to evaluate a string as JavaScript because 'unsafe-eval' is
    not an allowed source of script in the following Content Security
    Policy directive: "script-src 'self' chrome-extension-resource:".</p>
  </blockquote>
  
  <p>Stack trace:</p>
  
  <pre><code>angular.js:1011
  csp angular.js:1011
  (anonymous function) angular.js:23556
  </code></pre>
  
  <p>UPDATE: See documentation of <code>ng-csp</code> <a href="https://docs.angularjs.org/api/ng/directive/ngCsp" rel="nofollow">https://docs.angularjs.org/api/ng/directive/ngCsp</a></p>
  
  <p>OUTDATED: It looks like AngularJS fails to detect CSP in chrome extension. Use explicit <code>ng-csp</code>. Link to the AngularJS issue: <a href="https://github.com/angular/angular.js/issues/8777" rel="nofollow">https://github.com/angular/angular.js/issues/8777</a></p>