美文网首页
问题:Module 'ngFileUpload' is not

问题:Module 'ngFileUpload' is not

作者: 夜半雨1 | 来源:发表于2019-04-22 13:11 被阅读0次

    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>
    

    相关文章

      网友评论

          本文标题:问题:Module 'ngFileUpload' is not

          本文链接:https://www.haomeiwen.com/subject/sodygqtx.html