How to handle routing in Angular 5+ Service Workers?

TL;DR: I’ve identified at least two issues causing breakage in my case; you can use this build script for now to try my fix, and see the app work offline here. Further testing & pull requests needed. While I’ve been unable to find a documented answer, here’s what I’ve been able to find thus far, … Read more

Angular 5 and Service Worker: How to exclude a particular path from ngsw-config.json

Thanks to the Pedro Arantes advice, I reached the next working config (see dataGroups and “maxAge”: “0u”): { “index”: “/index.html”, “dataGroups”: [ { “name”: “api”, “urls”: [“/api”], “cacheConfig”: { “maxSize”: 0, “maxAge”: “0u”, “strategy”: “freshness” } } ], “assetGroups”: [ { “name”: “app”, “installMode”: “prefetch”, “resources”: { “files”: [ “/favicon.ico”, “/index.html” ], “versionedFiles”: [ “/*.bundle.css”, … Read more

tech