Sometimes, we want to generate command model in Angular Project with Angular-CLI.
In this article, we’ll look at how to generate command model in Angular Project with Angular-CLI.
How to generate command model in Angular Project with Angular-CLI?
To generate command model in Angular Project with Angular-CLI, we generate a class.
For instance, we run
ng generate class hero --type=model
to generate the hero
model class.
We set the type
option to model
to generate a model class.
Then we get the hero.model.ts
file as a result.
Conclusion
To generate command model in Angular Project with Angular-CLI, we generate a class.