标签: angular progressive-web-apps angular-service-worker
我正在尝试创建新的角度PWA,但是当我执行ng new pwa --service-worker时,系统返回未知选项:'--service-worker'
ng new pwa --service-worker
你知道怎么了吗?
答案 0 :(得分:2)
--service-worker选项仅适用于ng build command。
--service-worker
ng build
您可以通过先运行常规ng new command后再运行ng add command来生成PWA。
ng new
ng add
ng new pwa ng add @angular/pwa --project pwa