ngmodule
class ServiceWorkerModule { static register(script: string, options: SwRegistrationOptions = {}): ModuleWithProviders<ServiceWorkerModule> }
register() | ||||||
---|---|---|---|---|---|---|
Register the given Angular Service Worker script. | ||||||
|
script | string | |
options | SwRegistrationOptions | Optional. Default is |
If enabled
is set to false
in the given options, the module will behave as if service workers are not supported by the browser, and the service worker will not be registered.
Provider |
---|
SwPush |
SwUpdate |
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/service-worker/ServiceWorkerModule