gpt4 book ai didi

angularjs - 如何防止错误 : [ng:btstrpd] App Already Bootstrapped with this Element 'document'

转载 作者:行者123 更新时间:2023-12-03 22:36:34 26 4
gpt4 key购买 nike

使用 Angular meteor v 0.9

试图让预先打包的 AngularMeteor-SmartAdmin 示例应用程序正确加载

获取错误:

Error: [ng:btstrpd] App Already Bootstrapped with this Element 'document'

有没有办法找出这个错误发生的原因和位置?

这是我的 meteor 列表:
angular:angular-animate                               1.4.0  AngularJS (official) release. For full...
angular:angular-cookies 1.4.0 AngularJS (official) release. For full...
angular:angular-resource 1.4.0 AngularJS (official) release. For full...
angular:angular-route 1.4.0 AngularJS (official) release. For full...
angular:angular-sanitize 1.4.0 AngularJS (official) release. For full...
angularui:angular-ui-router 0.2.15 angular-ui-router (official): Flexibl...
angularui:ui-utils 0.2.4 Angular-ui-utils package for meteor.
autopublish 1.0.3 Publish the entire database to all cli...
cfs:http-methods 0.0.29 Adds HTTP.methods RESTful
gsklee:ngstorage 0.3.0 ngStorage package for Meteor
http 1.1.0 Make HTTP calls to remote servers
insecure 1.0.3 Allow all database writes by default
less 1.0.14 The dynamic stylesheet language
meteor-platform 1.2.2 Include a standard set of Meteor packa...
planettraining:angular-translate 2.7.0 Angular Translate
planettraining:angular-translate-loader-static-files 2.7.0 Angular Translate
planettraining:angular-translate-loader-url 2.7.0 Angular Translate
planettraining:angular-translate-storage-cookie 2.7.0 Angular Translate
planettraining:angular-translate-storage-local 2.7.0 Angular Translate
selchenkov:angular-bootstrap-ui 0.0.1 Meteor
urigo:angular 0.9.0

最佳答案

问题在于 index.ng.html 的文件路径在 index.html的 ng-include

它应该是

<div ng-include="'client/index.ng.html'">
</div>

路径总是绝对的,如 Angular Meteor 中所述教程

It's very important to note - the paths are always absolute, not relative! so if 'index.ng.html' was inside a client folder, you would have to place the whole path from the route app, doesn't matter where you're calling the file from. like this (e.g. if index.ng.html was in the 'client' folder):

<div ng-include="'client/index.ng.html'"></div>

关于angularjs - 如何防止错误 : [ng:btstrpd] App Already Bootstrapped with this Element 'document' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30822619/

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