Angularjs 在chrome应用程序中使用$location抛出错误

Angularjs 在chrome应用程序中使用$location抛出错误,angularjs,google-chrome-app,Angularjs,Google Chrome App,添加$location function DocsController($scope, $location,$http, gdocs) { 应用程序抛出此错误 Refused to load the script 'http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js' because it violates the following Content Security Policy directi

添加
$location

function DocsController($scope, $location,$http, gdocs) {
应用程序抛出此错误

Refused to load the script 

'http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js' because it violates the following Content Security Policy directive: "default-src 'self' blob: filesystem: chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

main.html:1 Refused to load the script 'http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js' because it violates the following Content Security Policy directive: "default-src 'self' blob: filesystem: chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

main.html:1 Refused to load the script 'http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js' because it violates the following Content Security Policy directive: "default-src 'self' blob: filesystem: chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

extensions::platformApp:17 history.pushState is not available in packaged apps.(anonymous function) @ extensions::platformApp:17
angular-1.1.0.min.js:60 TypeError: Cannot read property 'accessToken' of undefined
    at Object.DocsController.$scope.toggleAuth (app.js:162)
    at new DocsController (app.js:180)
    at d (angular-1.1.0.min.js:27)
    at Object.instantiate (angular-1.1.0.min.js:27)
    at angular-1.1.0.min.js:50
    at angular-1.1.0.min.js:42
    at m (angular-1.1.0.min.js:6)
    at k (angular-1.1.0.min.js:42)
    at e (angular-1.1.0.min.js:38)
    at k (angular-1.1.0.min.js:42)

基本搜索告诉我可以使用$location。我的方法有问题

您是否将Angular v1.1.0与所有其他库的v1.4.8一起使用?如果参考Angular v1.4.8,问题是否会继续?混合版本的Angular库通常会导致奇怪的行为。我将所有内容更新为1.5.3,Angular material更新为1.0.7。错误是否存在?您是否检查了?@lex如果您询问我是否使用了ng csp,那么答案是肯定的。除此之外,我在多个地方都读到,我正在做的事情应该可以避免一些我无法发现的小错误。