1.创建Component
ng g component my-new-component
还可以配置一些参数
ng g component my-new-component --spec=true
生成不带测试文件的component,也适用于其他的指令,pipe,服务
2.创建 Directive
ng g directive my-new-directive
3.创建Pipe
ng g pipe my-new-pipe
4.创建Service
ng g service my-new-service
5.创建Class
ng g class my-new-class
6.创建Guard
ng g guard my-new-guard
7创建Interface
ng g interface my-new-interface
8.创建Enum
ng g enum my-new-enum
9.创建Module
ng g module my-module
这个可以添加一些参数
ng g module my-module --routing=true
生成带路由的模块