angular-pwa-sample

Angular PWA Sample

Stars
40
Committers
2

angular-pwa-sample

This is a PWA sample using Angular CLI.

This sample contains following features.

  • Angular Service Worker
  • App Shell with Angular Universal

Tutorial

  1. Install Angular CLI
$ npm i -g @angular/cli
  1. Create an app
$ ng new my-app --routing --style=css
$ cd my-app
  1. Add service worker
$ ng add @angular/pwa
  1. Generate App Shell
$ ng g app-shell --project=my-app
  1. Run ng run to build the app
$ ng run my-app:app-shell

Congratulations ! Your Angular application is built in dist/my-app/browser.

You can see the app by using a static file server.

$ npx serve -s dist/my-app/browser