Angular: fully install service worker before anything else
问题 I'm writing a PWA in Angular that needs to be ready to go offline from a single page load. The documentation for the service worker life cycle specifies that the worker is installed but not active immediately: https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle This is by design and can be overruled by calling clients.claim() . The problem with this is that Angular loads the service worker after the whole app has been loaded so claim() has nothing left to claim.