4

I have followed the angular documentation on service worker and I am able to run the project offline on the local machine. When I try to deploy to Github pages, it's working fine in online mode and I am also able to see files are fetched through service workers in network and service worker is running in application tab but when I try to reload the page in offline mode it's not working.

https://github.com/PrithiviRajG/Angular-Service-Worker is my Github account https://prithivirajg.github.io/Angular-Service-Worker/ is my Github page

Maciej Treder
  • 11,866
  • 5
  • 51
  • 74
Prithivi Raj
  • 2,658
  • 1
  • 19
  • 34

1 Answers1

0

As far as I know, there is an issue, with Service Worker functionality, in the latest Angular release (5.2.7). More info can be found here.

Try to change your dependencies from ^5.2.0 to 5.2.0 (exact match)

Here you can check working example: Angular PWA and Angular Universal PWA - live demo

Maciej Treder
  • 11,866
  • 5
  • 51
  • 74