I\'m starting to use angular-cli and I\'ve already read a lot to find an answer about what I want to do...no success, so I came here.
Is there a way to create a componen
Basic:
ng g module chat
ng g service chat/chat -m chat
ng g component chat/chat-dialog -m chat
In chat.module.ts:
exports: [ChatDialogComponent],
providers: [ChatService]
In app.module.ts:
imports: [
BrowserModule,
ChatModule
]
Now in app.component.html:
LAZY LOADING:
ng g module pages --module app.module --route pages
CREATE src/app/pages/pages-routing.module.ts (340 bytes)
CREATE src/app/pages/pages.module.ts (342 bytes)
CREATE src/app/pages/pages.component.css (0 bytes)
CREATE src/app/pages/pages.component.html (20 bytes)
CREATE src/app/pages/pages.component.spec.ts (621 bytes)
CREATE src/app/pages/pages.component.ts (271 bytes)
UPDATE src/app/app-routing.module.ts (8611 bytes)
ng g module pages/forms --module pages/pages.module --route forms
CREATE src/app/forms/forms-routing.module.ts (340 bytes)
CREATE src/app/forms/forms.module.ts (342 bytes)
CREATE src/app/forms/forms.component.css (0 bytes)
CREATE src/app/forms/forms.component.html (20 bytes)
CREATE src/app/forms/forms.component.spec.ts (621 bytes)
CREATE src/app/forms/forms.component.ts (271 bytes)
UPDATE src/app/pages/pages-routing.module.ts (437 bytes)