Ionic 3 application to PWA

I need to define a current Ionic 3 application for PWA

I’m new to Ionic, and I need to set an Ionic3 APP for also be possible to access via WEB. I believe that would be the ideal way through PWA.

Is there a step by step to the final use of the web version, how should I do?

thank you

First, go into src/index.html and find the below commented out script that enables the service worker and uncomment it:

<script>
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('service-worker.js')
      .then(() => console.log('service worker installed'))
      .catch(err => console.log('Error', err));
  }
</script>

And that is it.

Check this out:


https://blog.ionicframework.com/how-to-make-pwas-with-ionic/

1 Like

I also wrote a short post on this at: https://chrisgriffith.wordpress.com/2017/08/24/case-study-stone-fest-21-pwa/

In my new book I talk about PWAs, but it around Ionic 4.

Chris
ionic-book.com

2 Likes