- install CLI
npm install -g @angular/cli
- create a new app
ng new sw-demo-app && cd sw-demo-app
- install service worker
npm install @angular/service-worker --save
- enable service worker
ng set apps.0.serviceWorker=true
- build with AoT compilation + optimizations
ng build --aot --prod
Last active
February 10, 2017 21:04
-
-
Save robwormald/a7753d7a6a8c44254387a78fd976bf75 to your computer and use it in GitHub Desktop.