访问示例https://app.ijilu.cn/

【----------【一.angular的安装】----------】

1.安装全局angular/cli命令包

npm install -g @angular/cli

2.创建一个项目angular

ng new angular

3.运行项目

cd angular

ng serve --open

【----------【二.angular配置build路径】----------】

1.项目根目录找到angular.json

2.找到字段outputPath

3.默认dist/angular,修改成dist,直接生成到dist下

4.web服务nginx配置,将根目录设置成dist

root /var/ijilu_cn/angular/dist;

【----------【三.angular配置ant.design】----------】

1.安装包

ng add ng-zorro-antd或者npm install ng-zorro-antd --save

2.使用紧凑型样式

找到src/styles.less

样式替换成@import "~ng-zorro-antd/ng-zorro-antd.compact.less";

【----------【四.angular cli新建文件】----------】

ng generate component components/Logo

ng generate component components/menu

ng generate component components/nav

ng generate module components/menu

ng generate module components/nav

【----------【五.angular配置代理-跨域】----------】

配置跨域https://angular.cn/guide/build#proxying-to-a-backend-server

【----------【六.angular配置百度echarts】----------】

配置ngx-echartshttps://www.npmjs.com/package/ngx-echarts