July 2017
Intermediate to advanced
384 pages
8h 23m
English
Angular CLI allows us to generate components, services, directives, routes, pipes, and many more with ng generate. Here is how you would generate a component:
ng generate component path/name
For example, if we run the following command:
ng generate component shared/message
Four files will be generated and one updated. The produced output will be:
installing component create src/app/shared/message/message.component.scss create src/app/shared/message/message.component.html create src/app/shared/message/message.component.spec.ts create src/app/shared/message/message.component.ts update src/app/app.module.ts
The new component is registered in app.module.ts automatically. The generation of other scaffoldings is identical. ...
Read now
Unlock full access