AngularJS 错误 - 无法实例化模块 ngIdle

AngularJS Error - Failed to instantiate module ngIdle

我有一个 Angular 应用程序报告持续错误。

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 手动添加模块后,我的浏览器中一直出现错误。我什至在我的节点模块目录中看到 angular 空闲目录。

我该如何解决?

app.js声明

var app =angular.module('app', ['ngResource', 'LocalStorageModule', 'ui.router', 'kendo.directives', 'datatables' , 'datatables.bootstrap', 'datatables.scroller',  'angularMoment', 'ngAnimate','ngIdle']);

我的 index.html 缺少以下行

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

添加该行解决了错误。