Importing ServiceWorkerModule.register() will schedule registration of the Service Worker inside an APP_INITIALIZER. Previously, the Promise returned by navigator.serviceWorker.register() was returned from the initializer function. This has the unwanted side effect of blocking initialization until the SW is registered. Even worse, if the SW script fails to load, this can cause the app initialization to fail. The solution is to not return the registration promise from the initializer function, essentially decoupling registration from the rest of the initialization flow. This change is not unit testable as there are no mocks/adapters yet for navigator.serviceWorker. A future integration test should cover this case with better fidelity. PR Close #19936
…
Safari (7+), iOS (7+) and IE mobile (11) are tested on BrowserStack.
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
Quickstart
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%