Angular 4 Seite lädt nicht

jupper

Aktives Mitglied
Hallo zusammen,

ich beschäftige mich aktuell mit ein wenig Webentwicklung und hierbei mit Java EE und Angular. Ich arbeite mich gerade mit Hilfe eines Buches ein wenig in Angular 4 ein. Leider sind in dem Buch häufig Fehler, dazu kommen noch Fehler meinerseits, so, dass der Code meistens nicht auf Anhieb funktioniert. Bisher konnte ich alles soweit selbst lösen, allerdings habe ich aktuell ein Problem bei dem ich gerade keinerlei Ansatz habe, was da überhaupt das Problem ist. In dem Buch wird ein Onlineshop für Pizza erstellt. Und im letzten Kapitel wurde ein Login-System eingebaut, soweit lief auch alles, nach ein paar kleinen Änderungen lädt die Seite nicht mehr. In der Browser-Konsole werden folgende Fehlermeldungen ausgegeben.

Code:
AppComponent_Host.html:1 ERROR Error: No provider for Account!
    at injectionError (reflective_errors.ts:71) [angular]
    at noProviderError (reflective_errors.ts:105) [angular]
    at ReflectiveInjector_._throwOrNull (reflective_injector.ts:500) [angular]
    at ReflectiveInjector_._getByKeyDefault (reflective_injector.ts:543) [angular]
    at ReflectiveInjector_._getByKey (reflective_injector.ts:404) [angular]
    at ReflectiveInjector_.get (reflective_injector.ts:349) [angular]
    at AppModuleInjector.get (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.getInternal (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.NgModuleInjector.get (ng_module_factory.ts:141) [angular]
    at resolveDep (provider.ts:504) [angular]
    at createClass (provider.ts:368) [angular]
    at createDirectiveInstance (provider.ts:192) [angular]
    at createViewNodes (view.ts:291) [angular]
    at createRootView (view.ts:223) [angular]

Code:
AppComponent_Host.html:1 ERROR CONTEXT
DebugContext_ {view: Object, nodeIndex: 1, nodeDef: Object, elDef: Object, elView: Object}

Code:
Unhandled Promise rejection: No provider for Account! ; Zone: <root> ; Task: Promise.then ; Value: Error: No provider for Account!
    at injectionError (reflective_errors.ts:71) [angular]
    at noProviderError (reflective_errors.ts:105) [angular]
    at ReflectiveInjector_._throwOrNull (reflective_injector.ts:500) [angular]
    at ReflectiveInjector_._getByKeyDefault (reflective_injector.ts:543) [angular]
    at ReflectiveInjector_._getByKey (reflective_injector.ts:404) [angular]
    at ReflectiveInjector_.get (reflective_injector.ts:349) [angular]
    at AppModuleInjector.get (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.getInternal (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.NgModuleInjector.get (ng_module_factory.ts:141) [angular]
    at resolveDep (provider.ts:504) [angular]
    at createClass (provider.ts:368) [angular]
    at createDirectiveInstance (provider.ts:192) [angular]
    at createViewNodes (view.ts:291) [angular]
    at createRootView (view.ts:223) [angular] Error
    at injectionError (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:1238:86) [angular]
    at noProviderError (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:1276:12) [angular]
    at ReflectiveInjector_._throwOrNull (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:2777:19) [angular]
    at ReflectiveInjector_._getByKeyDefault (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:2816:25) [angular]
    at ReflectiveInjector_._getByKey (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:2748:25) [angular]
    at ReflectiveInjector_.get (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:2617:21) [angular]
    at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:236:129) [angular]
    at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:415:51) [angular]
    at AppModuleInjector.NgModuleInjector.get (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:3563:44) [angular]
    at resolveDep (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:10931:45) [angular]
    at createClass (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:10792:91) [angular]
    at createDirectiveInstance (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:10628:37) [angular]
    at createViewNodes (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:11978:49) [angular]
    at createRootView (http://localhost:3000/node_modules/@angular/core//bundles/core.umd.js:11883:5) [angular]

Code:
Error: Uncaught (in promise): Error: No provider for Account!
Error
    at injectionError (reflective_errors.ts:71) [angular]
    at noProviderError (reflective_errors.ts:105) [angular]
    at ReflectiveInjector_._throwOrNull (reflective_injector.ts:500) [angular]
    at ReflectiveInjector_._getByKeyDefault (reflective_injector.ts:543) [angular]
    at ReflectiveInjector_._getByKey (reflective_injector.ts:404) [angular]
    at ReflectiveInjector_.get (reflective_injector.ts:349) [angular]
    at AppModuleInjector.get (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.getInternal (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.NgModuleInjector.get (ng_module_factory.ts:141) [angular]
    at resolveDep (provider.ts:504) [angular]
    at createClass (provider.ts:368) [angular]
    at createDirectiveInstance (provider.ts:192) [angular]
    at createViewNodes (view.ts:291) [angular]
    at createRootView (view.ts:223) [angular]
    at injectionError (reflective_errors.ts:71) [angular]
    at noProviderError (reflective_errors.ts:105) [angular]
    at ReflectiveInjector_._throwOrNull (reflective_injector.ts:500) [angular]
    at ReflectiveInjector_._getByKeyDefault (reflective_injector.ts:543) [angular]
    at ReflectiveInjector_._getByKey (reflective_injector.ts:404) [angular]
    at ReflectiveInjector_.get (reflective_injector.ts:349) [angular]
    at AppModuleInjector.get (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.getInternal (module.ngfactory.js? [sm]:1) [angular]
    at AppModuleInjector.NgModuleInjector.get (ng_module_factory.ts:141) [angular]
    at resolveDep (provider.ts:504) [angular]
    at createClass (provider.ts:368) [angular]
    at createDirectiveInstance (provider.ts:192) [angular]
    at createViewNodes (view.ts:291) [angular]
    at createRootView (view.ts:223) [angular]
    at :3000/node_modules/zone.js/dist/zone.js:654:33 [<root>]
 

Neue Themen


Oben