gpt4 book ai didi

javascript - 错误: [$injector:modulerr] Failed to instantiate module dx due to:Error: [$compile:baddir] Directive name 'DOMComponent' is invalid

转载 作者:行者123 更新时间:2023-12-03 02:39:21 26 4
gpt4 key购买 nike

我在运行应用程序时收到此错误。 Angular :1.6.8jQuery:2.2.4鲍尔:1.8.2

屏幕一片空白。

Uncaught Error: [$injector:modulerr] Failed to instantiate module ftfwebApp due to: Error: [$injector:modulerr] Failed to instantiate module dx due to: Error: [$compile:baddir] Directive name 'DOMComponent' is invalid. The first character must be a lowercase letter http://errors.angularjs.org/1.4.3/$compile/baddir?p0=DOMComponent at http://localhost:8080/bower_components/angular/angular.js:68:12 at assertValidDirectiveName (http://localhost:8080/bower_components/angular/angular.js:6905:13) at $CompileProvider.registerDirective [as directive] (http://localhost:8080/bower_components/angular/angular.js:6932:7) at runInvokeQueue (http://localhost:8080/bower_components/angular/angular.js:4356:35) at http://localhost:8080/bower_components/angular/angular.js:4364:11 at forEach (http://localhost:8080/bower_components/angular/angular.js:336:20) at loadModules

最佳答案

更改指令名称

DOMComponent to dom-component

您应该在 html 中使用破折号分隔的名称,并使用驼峰式命名法作为指令中的相应名称。

关于javascript - 错误: [$injector:modulerr] Failed to instantiate module dx due to:Error: [$compile:baddir] Directive name 'DOMComponent' is invalid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48394828/

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