SwUpdate
class
npm Package | @angular/service-worker |
---|---|
Module | import { SwUpdate } from '@angular/service-worker'; |
Source | service-worker/src/update.ts |
Overview
class SwUpdate { constructor(sw: NgswCommChannel) get available: Observable<UpdateAvailableEvent> get activated: Observable<UpdateActivatedEvent> get isEnabled: boolean checkForUpdate(): Promise<void> activateUpdate(): Promise<void> }
Description
Subscribe to update notifications from the Service Worker, trigger update checks, and forcibly activate updates.
Constructor
constructor(sw: NgswCommChannel)
Members
get available: Observable<UpdateAvailableEvent>
get activated: Observable<UpdateActivatedEvent>
get isEnabled: boolean
Returns true if the Service Worker is enabled (supported by the browser and enabled via ServiceWorkerModule).
checkForUpdate(): Promise<void>
activateUpdate(): Promise<void>
Annotations
@Injectable()
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v5.angular.io/api/service-worker/SwUpdate