Generate Component using Angular CLI

Open the Terminal in Visual Studio Code, select folder and go to your project directory.

    Click Image to Zoom

    Type the command “ng generate component product” on the command prompt to generate ProductComponent.

    Click Image to Zoom

    Angular CLI will generate product folder in the app folder with 4 files:

    • product.component.css
    • product.component.html
    • product.component.spec.ts
    • product.component.ts
    Click Image to Zoom