问题:Module 'ngFileUpload' is not available! You either misspelled the module name or forgot to loa...

1、问题描述

angular.js:63 Uncaught Error: [$injector:modulerr] Failed to instantiate module lmpApp due to:
Error: [$injector:modulerr] Failed to instantiate module opCenterApp due to:
Error: [$injector:modulerr] Failed to instantiate module ngFileUpload due to:
Error: [$injector:nomod] Module 'ngFileUpload' 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.
http://errors.angularjs.org/1.3.20/$injector/nomod?p0=ngFileUpload
    at http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:63:12
    at http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:1778:17
    at ensure (http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:1702:38)
    at module (http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:1776:14)
    at http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:4131:22
    at forEach (http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:326:20)
    at loadModules (http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:4115:5)
    at http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:4132:40
    at forEach (http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:326:20)
    at loadModules (http://test-wpt.jt56.com:8000/bower_components/angular/angular.js:4115:5)

2、问题原因

项目中缺少对ng-file-upload.js的引入

3、解决办法

在项目中增加ng-file-upload的引入,注意,需要将此引用放在angular引用的后面。

<script src="bower_components/ng-file-upload/ng-file-upload.js"></script>
<script src="bower_components/ng-file-upload-shim/ng-file-upload-shim.js"></script>
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容