angular-cn/packages/service-worker/src
Sonu Kapoor 2d7c95fb70 fix(service-worker): prevent SW registration strategies from affecting app stabilization (#35870)
Previously, some of the built-in ServiceWorker registration strategies,
namely `registerWithDelay:<timeout>` and `registerWhenStable:<timeout>`,
would register potentially long-running timeout, thus preventing the app
from stabilizing before the timeouts expired. This was especially
problematic for the `registerWhenStable:<timeout>` strategy, which waits
for the app to stabilize, because the strategy itself would prevent the
app from stabilizing and thus the ServiceWorker would always be
registered after the timeout.

This commit fixes this by subscribing to the registration strategy
observable outside the Angular zone, thus not affecting the app's
stabilization.

PR Close #35870
2020-03-27 10:47:44 -07:00
..
index.ts feat(service-worker): expose `SwRegistrationOptions` token to allow runtime config (#21842) 2019-04-25 12:29:58 -07:00
low_level.ts refactor(service-worker): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:26 -07:00
module.ts fix(service-worker): prevent SW registration strategies from affecting app stabilization (#35870) 2020-03-27 10:47:44 -07:00
push.ts docs(service-worker): add example app for `SwPush` API docs (#32139) 2019-08-27 16:18:53 -07:00
update.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00