Generate component in Angular using cli

0
74
Angular

This examples explain how to create component in Angular using CLI command.

Example to generate component in Angular

Suppose you want to generate component with name (Login), then open the cli terminal and run the below code.

ng generate component login

The CLI command creates a new folder, src/app/login/, and generates the four files of the LoginComponent.

LEAVE A REPLY

Please enter your comment!
Please enter your name here