Wednesday, August 12, 2020

Angular CLI- Create Component

 


component

ng generate component <name> [options]
ng g component <name> [options]

Creates a new generic component definition in the given or default project.

Refer:https://angular.io/cli/generate

OR 


In command prompt type

ng generate component YOURCOMPONENTNAME

There are even shorthands for this: the commands generate can be used as g and component as c:

ng g c YOURCOMPONENTNAME

you can use ng --helpng g --help or ng g c --help for the docs.


Refer: https://stackoverflow.com/questions/44151427/how-to-create-a-new-component-in-angular-4-using-cli

No comments:

Post a Comment

Health Benefits of Cashews

  Benefits of Cashews. Healthy food is an integral part of healthy body. Regular exercises such as Yoga and healthy diet is important to...