Build progressive web apps (PWAs) with Workbox - the Service Worker library from the Chrome team| Chrome for Developers
Update December 2018: Visit this blog post https://golb.hplar.ch/2018/12/background-sync-ng.html if you are interested in the same example but with the Angular service worker.| golb.hplar.ch
Adding a service worker to an Angular app is quite easy. Issue the command ng add @angular/pwa, and it adds a| golb.hplar.ch