Error: $injector:modulerr Module Error

Failed to instantiate module app due to://实例化失败
Error: [$injector:modulerr] http://errors.angularjs.org/1.6.6/$injector/modulerr?p0=n...)
    at http://localhost:56500/Scripts/angular.min.js:7:76
    at http://localhost:56500/Scripts/angular.min.js:43:70
    at p (http://localhost:56500/Scripts/angular.min.js:8:7)
    at g (http://localhost:56500/Scripts/angular.min.js:42:138)
    at http://localhost:56500/Scripts/angular.min.js:42:322
    at p (http://localhost:56500/Scripts/angular.min.js:8:7)
    at g (http://localhost:56500/Scripts/angular.min.js:42:138)
    at hb (http://localhost:56500/Scripts/angular.min.js:46:250)
    at c (http://localhost:56500/Scripts/angular.min.js:22:19)
    at Uc (http://localhost:56500/Scripts/angular.min.js:22:332

Description

This error occurs when a module fails to load due to some exception. The error message above should provide additional context.

A common reason why the module fails to load is that you've forgotten to include the file with the defined module or that the file couldn't be loaded.

当模块由于某些异常而无法加载时,会发生此错误。 上面的错误信息应该提供额外的上下文。

模块无法加载的常见原因是您忘记将文件包含在定义的模块中,或者该文件无法加载。

Using ngRoute

In AngularJS 1.2.0 and later, ngRoute has been moved to its own module. If you are getting this error after upgrading to 1.2.x or later, be sure that you've installed ngRoute.

在AngularJS 1.2.0及更高版本中,ngRoute已被移至其自己的模块。 如果在升级到1.2.x或更高版本后收到此错误,请确保已经安装了ngRoute。(若已安装,请确保正确引用)

Monkey-patching AngularJS's ng module

This error can also occur if you have tried to add your own components to the ng module. This has never been supported and from 1.3.0it will actually trigger this error. For instance the following code could trigger this error.

如果您尝试将自己的组件添加到ng模块,也可能会发生此错误。 这从未被支持,从1.3.0it将实际触发此错误。 例如,以下代码可能会触发此错误。

angular.module('ng').filter('tel', function (){});

Instead create your own module and add it as a dependency to your application's top-level module. See #9692 and #7709 for more information

你可以创建自己的模块,并将其作为依赖关系添加到应用程序的顶级模块中。 有关详细信息,请参阅#9692和#7709

转载于:https://www.cnblogs.com/JackeyLove/p/7680167.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值