AngularJS Error: [$injector:nomod]
AngularJS Error: [$injector:nomod]
奇怪的是,该模块在Firefox中完美加载。
在Chrome中,模块有时会加载(在打开和关闭刷新时),并且似乎是唯一出现以下控制台错误的浏览器。
错误:[$injector:nomod]模块"myApp"不可用!您拼错了模块名称或忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数。
var myApp = angular.module('myApp', []);
function MyController($scope, $http){
$http.get("http://localhost/json").success(function(response){
$scope.customers = response;
});
});
myApp.controller('MyController', MyController);`
我认为"。success()"要避免承诺,应该使用.then(),这里有一个解释它的链接http://www.codelord.net/2015/05/25/dont-use-$https成功/
它是随机工作的,因为promise在您的案例中没有使用
相关文章:
- 错误:$injector:modulerr模块错误(我的第一个SPA应用程序)
- Angular $injector:unpr with uibModal
- 错误:$injector:modulerr加载图像时模块处于角度
- Karma Jasmine角度错误:[$injector:nomod]
- 为什么我得到错误:$injector:unp未知提供程序
- 何时在AngularJS中使用$injector
- 未捕获错误:由于,[$injector:moduler]未能实例化模块polmgr
- AngularJS-未捕获错误:[$injector:nomod]
- $injector:nomod模块“应用程序”不可用!仅限火狐浏览器
- 由于以下原因,无法实例化模块 myApp:错误:[$injector:nomod] http://errors.angu
- 错误: [$injector:nomod] 尝试将第三方模块添加到表示应用程序时
- Angular JS 错误: [$injector:nomod] 模块 'portfolioMockupApp.
- 未捕获的错误:[$injector:nomod] 和未捕获的错误:[$injector:模块rr]
- 简单的AngularJS示例(错误:[$injector:nomod],错误:[$sinjector:modulerr]
- 角度/因果报应:错误:[$injector:nomod]模块'模块'不可用
- AngularJS Error: [$injector:nomod]
- 错误:[$injector:nomod] Module 'nvd3'不可用
- 实例化demoApp模块失败,原因:错误:[$injector:nomod] module 'demoApp
- Angular JS错误:$injector:nomod Module在路由过程中不可用
- `[$injector:nomod] Module 'google-maps' is not avail