1、安装
npm install -g @angular/cli
//安装插件--vsCode有提示Angular Snippets (Version 8)
2、创建项目和启动项目
//创建项目ng new my-dream-app//启动项目ng serve
3、vsCode创建组件
3-1、命令行生成(推荐)
ng g component components/header
//项目结构app.module.ts //根模块@NgModule({ // 注册组件 declarations: [ AppComponent, HeaderComponent ], imports: [ BrowserModule ], providers: [], bootstrap: [AppComponent]})export class AppModule { }
3-2、手动创建(需手动引入)
//安装插件Angular Files
4、Angular引入ng-zorro-antd
ng-zorro
全局引入
//vsCode命令行ng add ng-zorro-antd主组件内容被清空,需在.html中重新引入子组件
5、看到所有vsCode命令行的命令
ng g
