Angular 6 comes with a service worker cache implementation out of the box, which is a great start for building modern, resilient, progressive web applications. But only using the service worker's cache is like driving a sports car in 3rd gear at the most.
We'll dive into push notifications, background sync and other experimental service worker features, showing what they can be used for and how to integrate them in your Angular app. Together we'll see how to make your Angular apps appier and your users happier.
--
Links:
The example application: https://github.com/philnash/ng-sms-messages
Angular PWA guide: https://pwa.ng/
Angular Service Worker docs: https://angular.io/guide/service-worker-intro
swPush docs: https://angular.io/api/service-worker/SwPush
npm web-push: https://www.npmjs.com/package/web-push
@angular/service-worker Issues:
- Background Sync support: https://github.com/angular/angular/issues/22145
- Notification Click event support: https://github.com/angular/angular/issues/22311
npm patch-package: https://www.npmjs.com/package/patch-package
Workbox: https://developers.google.com/web/tools/workbox/
Blog posts
Permissions on the web suck: https://philna.sh/blog/2018/01/08/permissions-on-the-web-suck/
Background Sync: https://www.twilio.com/blog/2017/02/send-messages-when-youre-back-online-with-service-workers-and-background-sync.html
Background Fetch: https://philna.sh/blog/2017/07/04/experimenting-with-the-background-fetch-api/