添加依赖项后浏览器崩溃

Browser crash after adding dependency

本文关键字:浏览器 崩溃 依赖 添加      更新时间:2023-09-26

在模块中添加额外的依赖项后,整个事情在浏览器中崩溃(无法执行任何操作)。

Error: [$injector:modulerr] Failed to instantiate module myAppRename due to:
[$injector:modulerr] Failed to instantiate module myAppRename.view2 due to:
[$injector:modulerr] Failed to instantiate module ngMessages due to:
[$injector:nomod] Module 'ngMessages' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument    

这是在将ng-message添加到我的模块之后,但似乎这是各种依赖项的普遍问题。

这是我的模块的样子:

angular.module('myAppRename.view2', ['ngRoute', 'ngMessages'])    

我在这里做错了什么?

我遇到了同样的问题,错误是我忘记将角度消息脚本添加到我的网站:

<script type="text/javascript" src="/js/lib/angular/1.3.9/angular-messages.min.js"></script>