1. 创建一个ngalain项目
ng new my-project --style less
cd my-project
ng add ng-alain
2.添加PWA支持
ng add @angular/pwa
3.添加服务
npm install lite-server --global
4.启动PWA
ng build --prod && lite-server --baseDir dist/my-project
ng new my-project --style less
cd my-project
ng add ng-alain
ng add @angular/pwa
npm install lite-server --global
ng build --prod && lite-server --baseDir dist/my-project
本文标题:用angular 来构建PWA应用
本文链接:https://www.haomeiwen.com/subject/nzwidqtx.html
网友评论