Discussion

Developing a PWA Using Angular-cli

It’s so easy. Please follow below commands.

npm i -g @angular/cli
ng new pwa-example
cd pwa-example
ng add @angular/pwa

That’s all!
You have done Angular PWA. Your app will work on offline if you visited once and will work fast.

npm i -g http-server
ng build --prod
http-server -c-1 dist/pwa-example

Now, you can check your app at http://localhost:8080
One thing you must know: you need to build production app for testing your app.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *