mein Englisch ist schlecht, meine Entschuldigung für diese :)Angular 2 - Uncaught (in Versprechen): Fehler: XHR-Fehler (404 Not Found)
ich ein Problem mit Winkel 2. habe ich ein Login-Formular erstellen aber nach dem Aufruf des Web-Service und erhalten Antwort hatte ich diesen Fehler unten.
Zu geblockten und autorisierten Benutzer auf meiner App bin ich auf auth-guard.service.ts von eckigen Tutorial basiert.
Dieser Fehler kommt nach der Aktion canLoad auf meinem Routing.
Ich benutze eckige 2 neueste Version, mein Projekt basiert auf Webpack.
Mein Fehler:
core.umd.js?e2a5:3004 EXCEPTION: Uncaught (in promise): Error: XHR error (404 Not Found) loading http://localhost:9090/app/home/home.module
Error loading http://localhost:9090/app/home/home.module
Error: XHR error (404 Not Found) loading http://localhost:9090/app/home/home.module
at o (https://code.angularjs.org/tools/system.js:4:12694)
at XMLHttpRequest.I.s.onreadystatechange (https://code.angularjs.org/tools/system.js:4:13219)
at XMLHttpRequest.wrapFn [as _onreadystatechange] (eval at <anonymous> (http://localhost:9090/polyfills.js:2195:2), <anonymous>:698:29)
at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:9090/polyfills.js:2195:2), <anonymous>:265:35)
at Object.onInvokeTask (eval at <anonymous> (http://localhost:9090/vendor.js:100:2), <anonymous>:6197:41)
at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:9090/polyfills.js:2195:2), <anonymous>:264:40)
at Zone.runTask (eval at <anonymous> (http://localhost:9090/polyfills.js:2195:2), <anonymous>:154:47)
at XMLHttpRequest.ZoneTask.invoke (eval at <anonymous> (http://localhost:9090/polyfills.js:2195:2), <anonymous>:335:33)
Wenn Sie irgendwelche Lösungen :)
Sie haben home.module.ts erstellt haben Sie dieses Modul in der Datei APP.module importieren? –
mein Heimmodul ist: 'Import {NgModule} von '@ angular/core'; Importieren Sie {BrowserModule} von '@ angular/platform-browser'; Importieren Sie {FormsModule} aus '@ angular/forms'; importieren Sie {HomeRoutingModule} von './home-routing.module'; Importieren Sie {HomeComponent} aus './home.component'; @NgModule ({ Importe: [ BrowserModule, HomeRoutingModule ], Erklärungen: [ HomeComponent ] }) Export Klasse HomeModule {} ' – Eltron
und meine app.module: ' import {HomeModule} von './home/home.Modul'; @NgModule ({ Importe: [ BrowserModule, AppRoutingModule, AuthRoutingModule, HomeModule ], Erklärungen: [ AppComponent, Auth Komponente ], Bootstrap: [AppComponent] }) Export Klasse AppModule { } ' – Eltron