问题:Module 'ngFileUpload' is not

2019-04-22  本文已影响0人  夜半雨1

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>
上一篇下一篇

猜你喜欢

热点阅读