2016-05-18 13 views
1

ich eine Abhängigkeit in mein mein Hauptmodul injizieren wollen,Fehler bei der Abhängigkeit in den Hauptmodul Injektion

module app { 
    angular.module("movie", 
     ["common.services"]); 
} 

Dieser den Fehler erzeugt:

Error: $injector:modulerr Module Error

Wenn ich die dependecy die App Lasten auf Kommentar fein.

module app { 
    angular.module("movie", 
     [/*"common.services"*/]); 
} 

Und das ist der "common.service" Ich Injektion:

module app.common { 
    angular.module("common.services", 
     ["ngResources"]); 
} 

Mit Blick auf die docs Seite heißt es:

This error occurs when a module fails to load due to some exception

So sieht es aus wie das common.services Modul lädt nicht.

In meinem Index habe ich dies:

<!--Libraries--> 
<script src="Scripts/angular.min.js"></script> 
<script src="Scripts/angular-resource.min.js"></script> 
<script src="app.js"></script> 
<!--Controllers--> 
<script src="app/movieCtrl.js"></script> 
<script src="app/movieSearchCtrl.js"></script> 
<script src="app/movieListCtrl.js"></script> 
<!--Services--> 
<script src="app/services/common.services.js"></script> 

So ist die common.services Datei nach dem app.js. geladen wird Wo kommt der Fehler her?

Antwort

0

Nun, ich bin mit Typoskript nicht vertraut, sollte aber nicht Ihren Dienst

module common.services { 
    angular.module("common.services", 
     ["ngResources"]); 
} 

statt Modul app.common sein?

Verwandte Themen