Using AngularJS in a Google Chrome extension

后端 未结 2 1782
长发绾君心
长发绾君心 2020-12-24 02:35

I am trying to use the Google developer AngularJS library in an extension popup, but I get an error.

Error: Code generation from strings disallowed fo

相关标签:
2条回答
  • 2020-12-24 03:10

    <html ng-app="" ng-csp> causes an error in Chrome stable M21 in a chrome-extension://*.xhtml file.

    <html ng-app="" ng-csp=""> appears to work.

    0 讨论(0)
  • 2020-12-24 03:17

    You have to use CSP mode in angular to be inside Chrome extension. See: https://github.com/angular/angular.js/issues/893

    Basically you have to declare your app as:

    <html ng-app="" ng-csp>
    
    0 讨论(0)
提交回复
热议问题