angular/aio/content
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
..
cli docs: add how to pass array options to the CLI (#46505) 2022-06-27 10:56:30 -07:00
cli-src build(docs-infra): make the git ref for cli command docs configurable (#26391) 2018-10-11 12:57:49 -07:00
errors docs(core): Update inject error documentation (#47020) 2022-08-02 18:06:55 -07:00
examples docs(service-worker): improve docs related to SwUpdate APIs (#46960) 2022-09-06 09:11:57 -07:00
extended-diagnostics docs: apply suggestions from code review (#45325) 2022-04-08 19:36:30 +00:00
guide docs(service-worker): improve docs related to SwUpdate APIs (#46960) 2022-09-06 09:11:57 -07:00
images docs: update peek-a-boo example (#47219) 2022-08-22 16:03:18 -07:00
marketing docs: add Angular & JavaScript Master Podcast to resources list (#47227) 2022-08-23 16:20:43 -07:00
special-elements docs: make structural directives guide generic (#44895) 2022-05-23 13:44:41 -07:00
start docs: fix code style (#45527) 2022-06-14 19:56:49 +00:00
tutorial docs: Moving a div down in tutorial toh-pt6.md (#47095) 2022-08-11 16:09:51 +00:00
file-not-found.md docs: improve markdown (#45325) 2022-04-08 19:36:30 +00:00
license.md docs: improve markdown (#45325) 2022-04-08 19:36:30 +00:00
navigation.json docs: add image directive guide (#47155) 2022-08-24 12:16:48 -07:00