angular 创建

安装全局指令:npm install -g @angular/cli
创建项目: ng new my-app
完成之后进入项目: cd my-app
启动项目: ng serve --o
// 创建Component
ng g component my-new-component
// 创建指令
ng g directive my-new-directive
// 创建管道
ng g pipe my-new-pipe
// 创建服务
ng g service my-new-service
// 创建类
ng g class my-new-class
// 创建guard
ng g guard my-new-guard
// 创建接口
ng g interface my-new-interface
// 创建枚举
ng g enum my-new-enum
// 创建模块
ng g module my-module

猜你喜欢

转载自blog.csdn.net/Tom__cy/article/details/103106413