gpt4 book ai didi

html - 当我在 visual studio 上运行我的 Angular 应用程序时出现错误。

转载 作者:行者123 更新时间:2023-11-28 05:17:23 24 4
gpt4 key购买 nike

我使用 html、css 和 javascript 创建了一个待办事项列表应用程序。我正在尝试使用 javascript 创建相同的应用程序。我面临的问题是,当我在应用程序中包含 angular 时出现此错误。

Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.

最佳答案

这可能是一个 IE 错误,请尝试手动引导您的应用,而不是依赖使用 ng-app 指令的标准方法。

angular.element(document).ready(function () {  
angular.bootstrap(document, ['nameOfYourApp']);
});

https://github.com/angular/angular.js/issues/15567

https://github.com/angular/angular.js/issues/15772

https://www.roelvanlisdonk.nl/2017/02/01/fix-in-ie-angular-1-6-1-disabling-automatic-bootstrap-script-protocol-indicates-an-extension-document-location-href-does-not-match/

关于html - 当我在 visual studio 上运行我的 Angular 应用程序时出现错误。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43537085/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com