2017-02-03 45 views
1

尝试注入下划线,但每次给出错误 错误:[$ injector:modulerr]由于以下原因而无法实例化模块下划线: 错误:[$ injector:nomod]模块下划线不是可以!您拼错了模块名称或忘记加载模块名称。如果注册模块确保您指定依赖关系作为第二个参数。注入离子下划线

这里我的代码

angular.module('app', ['ionic','ui.filters','ui','ui.router','app.controllers', 'app.routes', 'app.services', 'app.directives','underscore']) 

已经安装形式凉亭

<script src="lib/underscore/underscore-min.js"></script> 
<script src="lib/angular-underscore-module/angular-underscore-module.js"></script> 
<script src="lib/angular/angular.js"></script> 
+0

无需为应用程序模块注入不足之处。 –

回答

0

您无需注入下划线到您的应用程序模块,您在索引页指出下划线js文件后,你可以只使用下划线代码中的功能。