由于以下原因,无法实例化模块应用程序:错误:模块“应用程序”不可用

时间:2018-10-28 16:09:45

标签: javascript html angularjs

我正在尝试在http://jsfiddle.net/animaxf/uXbn6/4779/使用小提琴,当我分叉小提琴时,它可以正常工作。但是,当我复制并创建新的应用程序(在http://jsfiddle.net/rishi007bansod/aqs3fj79/2/中创建)时,会出现以下错误:

Uncaught Error: [$injector:modulerr] Failed to instantiate module Application due to:
Error: [$injector:nomod] Module 'Application' 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.4.8/$injector/nomod?p0=Application
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:68:12
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:2005:17
    at ensure (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1929:38)
    at module (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:2003:14)
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4435:22
    at forEach (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:340:20)
    at loadModules (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4419:5)
    at createInjector (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4344:11)
    at doBootstrap (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1676:20)
    at bootstrap (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1697:12)
http://errors.angularjs.org/1.4.8/$injector/modulerr?p0=Application&p1=Error%3A%20%5B%24injector%3Anomod%5D%20Module%20'Application'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.4.8%2F%24injector%2Fnomod%3Fp0%3DApplication%0A%20%20%20%20at%20https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A68%3A12%0A%20%20%20%20at%20https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A2005%3A17%0A%20%20%20%20at%20ensure%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A1929%3A38)%0A%20%20%20%20at%20module%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A2003%3A14)%0A%20%20%20%20at%20https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A4435%3A22%0A%20%20%20%20at%20forEach%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A340%3A20)%0A%20%20%20%20at%20loadModules%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A4419%3A5)%0A%20%20%20%20at%20createInjector%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A4344%3A11)%0A%20%20%20%20at%20doBootstrap%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A1676%3A20)%0A%20%20%20%20at%20bootstrap%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A1697%3A12)
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:68:12
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:2005:17
    at ensure (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1929:38)
    at module (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:2003:14)
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4435:22
    at forEach (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:340:20)
    at loadModules (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4419:5)
    at createInjector (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4344:11)
    at doBootstrap (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1676:20)
    at bootstrap (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1697:12)
http://errors.angularjs.org/1.4.8/$injector/modulerr?p0=Application&p1=Error%3A%20%5B%24injector%3Anomod%5D%20Module%20'Application'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.4.8%2F%24injector%2Fnomod%3Fp0%3DApplication%0A%20%20%20%20at%20https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A68%3A12%0A%20%20%20%20at%20https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A2005%3A17%0A%20%20%20%20at%20ensure%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A1929%3A38)%0A%20%20%20%20at%20module%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A2003%3A14)%0A%20%20%20%20at%20https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A4435%3A22%0A%20%20%20%20at%20forEach%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A340%3A20)%0A%20%20%20%20at%20loadModules%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A4419%3A5)%0A%20%20%20%20at%20createInjector%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A4344%3A11)%0A%20%20%20%20at%20doBootstrap%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A1676%3A20)%0A%20%20%20%20at%20bootstrap%20(https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fangular.js%2F1.4.8%2Fangular.js%3A1697%3A12)
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:68:12
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4458:15
    at forEach (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:340:20)
    at loadModules (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4419:5)
    at createInjector (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:4344:11)
    at doBootstrap (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1676:20)
    at bootstrap (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1697:12)
    at angularInit (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:1591:5)
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:29013:5
    at HTMLDocument.trigger (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.js:3057:7)

是什么导致此错误?

1 个答案:

答案 0 :(得分:1)

您刚刚复制了代码,但是忘记了一些加载脚本的设置。 HTML部分:BODY TAG的配置应为<body ng-app="myApp">

JS部分:LOAD TYPe配置应为No wrap - bottom of <body>

enter image description here