在我的 AngularJS 应用程序中,加载我的网站时出现以下错误:
Uncaught Error: [ng:btstrpd] App Already Bootstrapped with this Element '<html lang="en" ng-app="app" class="ng-scope">'
我只设置了一次 ng-app
(在 _Layout.cshtml (ASP.NET MVC) 的 html
元素中)并且我不使用 angular .bootstrap
所以提到的问题here不应该申请。如何调试问题(使用 F12、Firebug、Chrome...)?
最佳答案
使用以下过程:
- 下载未压缩的 Angular 源代码
- 切换脚本标签以引用未缩小的 Angular 源代码或设置从缩小代码到未缩小代码的源映射
- 在
angular.bootstrap
方法定义中设置断点 - 使用调用堆栈跟踪调用的来源
引用资料
关于javascript - AngularJS:如何调试 'App Already Bootstrapped with this Element' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21485368/