在离子中注入下划线

时间:2017-02-03 19:17:16

标签: angularjs ionic-framework

尝试注入下划线但每次都给我错误 错误:[$ 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>

1 个答案:

答案 0 :(得分:0)

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