angularjs IE 11阻止从url加载资源$SCEDegate策略不允许

angularjs IE 11阻止从url加载资源$SCEDegate策略不允许,angularjs,internet-explorer-11,Angularjs,Internet Explorer 11,我的基于angularjs1.2.14的应用程序在IE10中加载良好。但是在IE11中,模板url被阻止,并且应用程序没有正确呈现。下面是我在控制台中看到的错误。我知道这是一个已知的问题,但已经解决了 您的错误报告包含一个解决方案。 链接到AngularJS知识库: 现在引述该页: 通常,如果您试图加载角度传感器,就会发生这种情况 来自不受信任源的模板。也有可能是一种习惯 指令出于类似的原因抛出此错误 Angular仅通过调用 $sce.getTrustedResourceUrl位于模板URL上

我的基于angularjs1.2.14的应用程序在IE10中加载良好。但是在IE11中,模板url被阻止,并且应用程序没有正确呈现。下面是我在控制台中看到的错误。我知道这是一个已知的问题,但已经解决了


您的错误报告包含一个解决方案。 链接到AngularJS知识库:

现在引述该页:

通常,如果您试图加载角度传感器,就会发生这种情况 来自不受信任源的模板。也有可能是一种习惯 指令出于类似的原因抛出此错误

Angular仅通过调用 $sce.getTrustedResourceUrl位于模板URL上

默认情况下,仅信任属于同一来源的URL。 这些URL的域、协议和端口与 申请文件

ngInclude指令和指定templateUrl的指令 需要受信任的资源URL

要从其他域和/或协议加载模板,请调整 白名单/黑名单或使用调用包装URL $sce.trustAsResourceUrl

注意:浏览器的同源策略和跨源资源 共享CORS策略可能会进一步限制 模板已成功加载。e、 g.既不是跨域请求,也不是跨域请求 不适用于所有浏览器,也不适用于某些浏览器的file://请求


是的,我看到了那个决议。我的所有模板都在我的应用程序内部,而不是外部资源。使用这种方法,我需要在我自己的应用程序中列出所有可能的资源路径,考虑到同一个应用程序在IE10、Chrome、Firefox等中运行良好,这可能有点过分。您可以使用IE11尝试这些机器中的一台,看看这是IE11还是您的机器设置阻止了这些URL。
Error: [$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy.  URL: resources/partials/overview.start.html
http://errors.angularjs.org/1.2.14/$sce/insecurl?p0=resources%2Fpartials%2Foverview.start.html
at getTrusted (https://myserver.com/resources/lib/angular/1.2.14/angular.js:12849:11)
at Anonymous function (https://myserver.com/resources/lib/angular/1.2.14/angular.js:13535:9)
at Anonymous function (https://myserver.com/resources/lib/angular/1.2.14/angular-route.js:528:17)
at wrappedCallback (https://myserver.com/resources/lib/angular/1.2.14/angular.js:11046:15)
at wrappedCallback (https://myserver.com/resources/lib/angular/1.2.14/angular.js:11046:15)
at Anonymous function (https://myserver.com/resources/lib/angular/1.2.14/angular.js:11132:11)
at $eval (https://myserver.com/resources/lib/angular/1.2.14/angular.js:12075:9)
at $digest (https://myserver.com/resources/lib/angular/1.2.14/angular.js:11903:15)
at $apply (https://myserver.com/resources/lib/angular/1.2.14/angular.js:12179:13)
at Anonymous function (https://myserver.com/resources/lib/angular/1.2.14/angular.js:1341:9) 

Error: [$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy.  URL: template/accordion/accordion-group.html
http://errors.angularjs.org/1.2.14/$sce/insecurl?p0=template%2Faccordion%2Faccordion-group.html
at getTrusted (https://myserver.com/resources/lib/angular/1.2.14/angular.js:12849:11)
at Anonymous function (https://myserver.com/resources/lib/angular/1.2.14/angular.js:13535:9)
at compileTemplateUrl (https://myserver.com/resources/lib/angular/1.2.14/angular.js:6463:7)
at applyDirectivesToNode (https://myserver.com/resources/lib/angular/1.2.14/angular.js:6066:11)
at compileNodes (https://myserver.com/resources/lib/angular/1.2.14/angular.js:5668:9)
at compile (https://myserver.com/resources/lib/angular/1.2.14/angular.js:5601:7)
at applyDirectivesToNode (https://myserver.com/resources/lib/angular/1.2.14/angular.js:5995:13)
at compileNodes (https://myserver.com/resources/lib/angular/1.2.14/angular.js:5668:9)
at compile (https://myserver.com/resources/lib/angular/1.2.14/angular.js:5601:7)
at applyDirectivesToNode (https://myserver.com/resources/lib/angular/1.2.14/angular.js:6009:13)<div class="snap-drawer snap-drawer-left ng-scope"