angular/aio/content/examples/service-worker-getting-started
George Kalpakas c905da12e2 docs(service-worker): improve docs related to SwUpdate APIs (#46960)
This commit improves documentation related to recently improved or
deprecated `SwUpdate` APIs in the following ways:

- Update [check-for-update.service.ts][1] to make use of the return
  value of [SwUpdate#checkForUpdate()][2].
- Update [prompt-update.service.ts][3] to not call
  [SwUpdate#activateUpdate()][4] and just reload the page.
- Update the [SwUpdate#activateUpdate()][4] API docs to explain that it
  is only useful if you want to update a client without reloading and
  that it can easily lead to version skew.
- Update [a code-snippet][5] to no longer be [hard-coded][6].

[1]: 9d9d05911d/aio/content/examples/service-worker-getting-started/src/app/check-for-update.service.ts (L16)
[2]: https://angular.io/api/service-worker/SwUpdate#checkForUpdate
[3]: 9d9d05911d/aio/content/examples/service-worker-getting-started/src/app/prompt-update.service.ts (L15)
[4]: https://angular.io/api/service-worker/SwUpdate#activateUpdate
[5]: 96c6139c9a/packages/service-worker/src/update.ts (L44-L54)
[6]: https://angular.io/guide/docs-style-guide#hard-coded-snippets

Fixes #43665

PR Close #46960
2022-09-06 09:11:57 -07:00
..
e2e/src test(docs-infra): disable the Selenium Promise Manager in docs examples e2e tests (#39818) 2020-11-24 14:56:14 -08:00
src docs(service-worker): improve docs related to SwUpdate APIs (#46960) 2022-09-06 09:11:57 -07:00
example-config.json build(docs-infra): update docs examples to Angular v12.1.3 (#42949) 2021-08-09 09:41:00 -07:00
ngsw-config.json docs(service-worker): fix the service-worker-getting-started docs example (#28020) 2019-01-11 11:17:18 -08:00