2016-05-26 7 views
0

Ich weiß, dass dies ein häufiges Problem ist, aber ich habe ein Projekt, ich übergebe auf Angular und keines der Module, die ich in der App (nämlich ngStorage) laden muss geladen werden . Ich weiterhin diesen Fehler in dem Konsolenprotokoll erhalten:AngularJS lädt nicht ngStorage oder irgendein Modul

angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module ICSPortalLoginAuth due to: 
Error: [$injector:modulerr] Failed to instantiate module ngStorage due to: 
Error: [$injector:nomod] Module 'ngStorage' 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.5.0/$injector/nomod?p0=ngStorage 
    at http://devel1.local.com/js/ng/angular.js:68:12 
    at http://devel1.local.com/js/ng/angular.js:2015:17 
    at ensure (http://devel1.local.com/js/ng/angular.js:1939:38) 
    at module (http://devel1.local.com/js/ng/angular.js:2013:14) 
    at http://devel1.local.com/js/ng/angular.js:4503:22 
    at forEach (http://devel1.local.com/js/ng/angular.js:321:20) 
    at loadModules (http://devel1.local.com/js/ng/angular.js:4487:5) 
    at http://devel1.local.com/js/ng/angular.js:4504:40 
    at forEach (http://devel1.local.com/js/ng/angular.js:321:20) 
    at loadModules (http://devel1.local.com/js/ng/angular.js:4487:5) 
http://errors.angularjs.org/1.5.0/$injector/modulerr?p0=ngStorage&p1=Error%…ules%20(http%3A%2F%2Fdevel1.local.com%2Fjs%2Fng%2Fangular.js%3A4487%3A5) 
    at http://devel1.local.com/js/ng/angular.js:68:12 
    at http://devel1.local.com/js/ng/angular.js:4526:15 
    at forEach (http://devel1.local.com/js/ng/angular.js:321:20) 
    at loadModules (http://devel1.local.com/js/ng/angular.js:4487:5) 
    at http://devel1.local.com/js/ng/angular.js:4504:40 
    at forEach (http://devel1.local.com/js/ng/angular.js:321:20) 
    at loadModules (http://devel1.local.com/js/ng/angular.js:4487:5) 
    at createInjector (http://devel1.local.com/js/ng/angular.js:4409:19) 
    at doBootstrap (http://devel1.local.com/js/ng/angular.js:1691:20) 
    at bootstrap (http://devel1.local.com/js/ng/angular.js:1712:12) 
http://errors.angularjs.org/1.5.0/$injector/modulerr?p0=ICSPortalLoginAuth&…rap%20(http%3A%2F%2Fdevel1.local.com%2Fjs%2Fng%2Fangular.js%3A1712%3A12) 

ngStorage im Header vor AngularJS oder meinem Eckige Modell geladen wird:

<script type='text/javascript' src='/js/ngstorage/ngStorage.min.js'></script> 
<script type='text/javascript' src='js/ng/angular.js'></script> 
<script src='js/ngres/LoginAuth.js'></script> 

Und ngStorage wird in der App Erklärung erklärt

var app = angular.module("Devel1", ['ngStorage']); 

Ich bin nicht klar, was sonst könnte dies verursachen. Es werden weitere JavaScript-Abhängigkeiten geladen, die zu Interferenzen führen können, nämlich jQuery und jspdf. Könnten diese den Modullader stören?

Ich bin ratlos, was die Ursache hier sein könnte. Ich entferne das Modul und der Code funktioniert (wie auch immer kleiner Code) wie beabsichtigt.

Antwort

0

Bitte laden Winkel Skript vor dem Laden ngStorage Skript und sehen .... Dies könnte gut funktionieren

Verwandte Themen