On this page
SwUpdate
class
final
Subscribe to update notifications from the Service Worker, trigger update checks, and forcibly activate updates.
class SwUpdate {
versionUpdates: Observable<VersionEvent>
available: Observable<UpdateAvailableEvent>
activated: Observable<UpdateActivatedEvent>
unrecoverable: Observable<UnrecoverableStateEvent>
isEnabled: boolean
checkForUpdate(): Promise<boolean>
activateUpdate(): Promise<boolean>
}
See also
Provided in
Properties
Property | Description |
---|---|
versionUpdates: Observable<VersionEvent> |
Read-Only Emits a Emits a Emits a |
available: Observable<UpdateAvailableEvent> |
Read-Only Emits an Deprecated Use The of behavior
|
activated: Observable<UpdateActivatedEvent> |
Read-Only Emits an Deprecated Use the return value of |
unrecoverable: Observable<UnrecoverableStateEvent> |
Read-Only Emits an |
isEnabled: boolean |
Read-Only True if the Service Worker is enabled (supported by the browser and enabled via |
Methods
checkForUpdate()
|
---|
Checks for an update and waits until the new version is downloaded from the server and ready for activation. |
|
activateUpdate()
|
---|
Updates the current client (i.e. browser tab) to the latest version that is ready for activation. |
|
© 2010–2022 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v13.angular.io/api/service-worker/SwUpdate