Home > Back-end >  What's i for in Angular CLI command: ng g i student?
What's i for in Angular CLI command: ng g i student?

Time:10-07

I am learning about activatedRoute following this article: https://www.positronx.io/understand-angular-7-activatedroute-route-and-its-usage/

I'm confused about this part:

Run the following command to generate student interface class for setting up data types.

ng g i student

Afterwards, go to student.ts file and add the following code into it.

I get that g is for generate; but what is the i for? Is there any documentation for this?

CodePudding user response:

ng g i student will be creating an interface.i stands for interface. This command is equivalent to ng generate interface student.

So an interface student will be generated after running the command ng g i student.

CodePudding user response:

The i stands for Interface in CLI. When you need to create an interface automatically we use ng g(generate) i(interface) path_where_it_should_be_implemented.

  • Related