2017-09-19 7 views
-1

Ich versuche, eine Komponente zu erstellen Verwendung mit dem Winkel/cli & die folgende Fehlermeldung erhalten:Fehler in Winkel-cli Hinzufügen einer Komponente

Error: Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule. 
Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule 

Antwort

0

Das ist wegen der neuen SPA-Vorlagen. Ich hatte das gleiche Problem und löste es durch Installation der Erweiterung "Angular files" für VS Code. Es erzeugt benötigte Dateien aus dem Kontextmenü. Dann müssen Sie lediglich Component in app.module.shared.ts

hinzufügen
Verwandte Themen