Angular 基础

创建
阅读 1056

安装 cli 工具

npm i -g @angular/cli

创建 user-manage 项目

ng new user-manage

创建组件

ng generate component users

创建服务

ng generate service user

启动应用

ng serve --open

添加依赖

ng add @angular/material

升级 angular

ng update

升级整个应用的依赖

ng update --all

自动化测试

ng test

测试,并生成覆盖率报告

ng test --code-coverage

编译

ng build

本文链接 https://www.yidiankuaile.com/post/angular-basic

最后更新