Angular命令

2020-04-21 10:24:29 浏览数 (1)

node -v 检查node.js安装 npm  -v 检查npm安装 npm install -g @angular/cli 安装CLI ng new my-app 创建工作空间并初始化应用 ng serve 运行应用 ng help 命令帮助 ng generate –help 命令帮助 ng add 添加包到项目中 ng build 编译发布 ng build –base-href /angular/my-test-app/ 指定子目录 ng config 添加配置信息 ng generate component video/video 创建组件 ng generate module demo 创建模块 ng generate enum video/GENRE 创建枚举类型 ng generate class video/video 创建类 ng generate service service/Logger  创建服务 ng generate directive my-directive 新建指令 ng generate pipe my-pipe 新建管道

备注 –base-href 注意目录结束要带/

0 人点赞