Languages
[Edit]
EN

Angular 7 - create component from command line

2 points
Created by:
Kate_C
2857

Command line:

ng generate component our-component-name


Step by step:
* From top level of our angular 7 app
open angular CLI
* and run:

ng generate component our-component-name


$ ng generate component our-component-name
CREATE src/app/our-component-name/our-component-name.component.html (37 bytes)
CREATE src/app/our-component-name/our-component-name.component.spec.ts (700 bytes)
CREATE src/app/our-component-name/our-component-name.component.ts (315 bytes)
CREATE src/app/our-component-name/our-component-name.component.css (0 bytes)
UPDATE src/app/app.module.ts (590 bytes)


After that this component is added to app.module.ts

Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.