Service Workers & Cows — a love story
summary
Shows how to add a service worker to an Angular app end to end: yarn/npm install, set "serviceWorker": true in angular.json, import and call ServiceWorkerModule.register in app.module, run ng build --prod and serve the dist folder (http-server or Python) and use --proxy to hit the backend. Demonstrates creating a dataGroup in ngsw-config.json to cache API routes, tests offline, and resolves stale-assets by choosing cache-first (performance) vs freshness. Notes that service worker is just a JavaScript file and to enable only in production; works on painfully slow ~6 Mbps networks.
AI-written summary · about
chapters (11)
- 0:00Intro
- 2:23Background
- 4:20Network Speed
- 5:28Service Workers
- 8:33Steps
- 12:35Update Issues
- 16:05Build the Project
- 17:23NG Serve
- 18:13Running the project
- 22:58Updating
- 30:17Data Group
related talks
20mAngular Service Workers & Cows — a love story
30mService Workers & Cows — a love story
34mService Workers & Cows — a love story
29mService Workers: understand and use
36mAngular and Service Workers
33mAngular and Service Workers
01h 00mService Worker: Bringing Native App Experience to Web Apps
22mAutomatic Progressive Web Apps using Angular Service Worker
