linkSwPush
npm Package | @angular/service-worker |
---|---|
Module | import { SwPush } from '@angular/service-worker'; |
Source | service-worker/src/push.ts |
linkOverview
class SwPush {
constructor(sw: NgswCommChannel)
get messages: Observable<object>
get subscription: Observable<PushSubscription | null>
get isEnabled: boolean
requestSubscription(options: {...}): Promise<PushSubscription>
unsubscribe(): Promise<void>
}
linkDescription
Subscribe and listen to push notifications from the Service Worker.
linkConstructor
linkMembers
get isEnabled: boolean
Returns true if the Service Worker is enabled (supported by the browser and enabled via ServiceWorkerModule).
linkAnnotations
@Injectable()