Angular cli has rich features of generating components, providers, modules and many more. Angular cli can also be used for build production ready product and serve the project for local environment.
Usage of Angular cli ng generate command
- To generate the component
ng generate component component_name
- To generate the modules
ng generate module name
- To generate the pipe
ng generate pipe name
- To generate the class
ng generate class name
- To generate the library
ng generate library name
- To generate the directive
ng generate directive name
- To generate the service
ng generate service name
How to generate component, service, module in sub folder using ng generate?
You can also use the same command for generating the component, services , modules etc using below command
ng generate component sub_folder/name