0
我有一個Angular應用程序報告持久性錯誤。AngularJS錯誤 - 無法實例化模塊ngIdle
Failed to instantiate module ngIdle due to ...
Error: $injector:nomod
Module Unavailable
Module 'ngIdle' 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.
通過npm install ng-idle
手動添加模塊後,我不斷收到我的瀏覽器錯誤。我甚至可以在我的node-modules目錄中看到角度空閒目錄。
我該如何解決這個問題?
app.js聲明
var app =angular.module('app', ['ngResource', 'LocalStorageModule', 'ui.router', 'kendo.directives', 'datatables' , 'datatables.bootstrap', 'datatables.scroller', 'angularMoment', 'ngAnimate','ngIdle']);
我猜你忘了注入app.js, angular.module('demo',['ngIdle']); –
您通過'npm install ng-idle'安裝了模塊,但是您是否在項目中包含了(新)ng-idle模塊? – lealceldeiro
是的,我已經在我的app.js錯誤之前注入了模塊 – Vahe