2017-02-23 16 views
0

Angularアプリケーションで永続エラーが報告されています。AngularJS Error - モジュール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']); 
+0

私はあなたがapp.jsに挿入するのを忘れたと思います。 angular.module( 'demo'、['ngIdle']); –

+1

'npm install ng-idle'でモジュールをインストールしましたが、あなたのプロジェクトに(新しい)ng-idleモジュールを含めましたか? – lealceldeiro

+0

はい、私はapp.jsでエラーの前に既にモジュールを注入しています – Vahe

答えて

0

私のindex.htmlは、行を追加する次の行

<script src="resources/js/idlejs/angular-idle.js"></script> 

がありませんでしたが、エラーを解決しました。

関連する問題