Ich habe gerade meinen Angular-Fullstack-Generator von 3.0.0-rc9 auf 3.7.0 aktualisiert.Der Dienst konnte nicht mit der letzten Version des Angular-Fullstack-Generators verwendet werden
habe ich ein neues Projekt:
yo angular-fullstack myProject
Ich habe einige Schwierigkeiten, wenn ich einen neuen Dienst erstellen möchten:
yo angular-fullstack:service myService
Sobald es erstellt wird, ich die folgende Fehler haben in meinem Browser: (das ist mein Problem)
angular.js:68
Uncaught Error: [$injector:nomod] Module 'myProjectApp.myService' 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.
Es ' s richtig in der index.html injizieren:
<script src="app/service/myService/myService.service.js"></script>
Und hier ist der Gehalt an myService.service.js: (nur für den Fall ^^)
'use strict';
angular.module('myProjectApp.myService')
.service('myService', function() {
// AngularJS will instantiate a singleton by calling "new" on this function
});
Ich weiß nicht, ob es könnte kommt von diesem: (während Bower installieren)
Unable to find a suitable version for angular, please choose one by typing one of the numbers below:
1) angular#~1.2.0 which resolved to 1.2.29 and is required by ngSweetAlert#1.1.0
2) angular#~1.2.9 which resolved to 1.2.29 and is required by ng-ckeditor#0.2.1
3) angular#>=1.4.0 which resolved to 1.5.5 and is required by angular-bootstrap#1.1.2
4) angular#^1.2.0 which resolved to 1.5.5 and is required by ngSmoothScroll#2.0.0
5) angular#1.5.5 which resolved to 1.5.5 and is required by angular-animate#1.5.5
6) angular#~1.5.0 which resolved to 1.5.5 and is required by webapp2
7) angular#^1.2.6 which resolved to 1.5.5 and is required by angular-socket-io#0.7.0
8) angular#^1.0.8 which resolved to 1.5.5 and is required by angular-ui-router#0.2.18
9) angular#>=1.2.0 <2.0.0 which resolved to 1.5.5 and is required by angular-validation-match#1.5.2
10) angular#* which resolved to 1.5.5 and is required by angular-clipboard#1.4.2
Prefix the choice with ! to persist it to bower.json
? Answer 5
Wie man es löst? Vielen Dank !