* Register the given Angular Service Worker script. * * 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.
(
script: string,
options: SwRegistrationOptions = {},
)
| 28 | * workers are not supported by the browser, and the service worker will not be registered. |
| 29 | */ |
| 30 | static register( |
| 31 | script: string, |
| 32 | options: SwRegistrationOptions = {}, |
| 33 | ): ModuleWithProviders<ServiceWorkerModule> { |
| 34 | return { |
| 35 | ngModule: ServiceWorkerModule, |
| 36 | providers: [provideServiceWorker(script, options)], |
| 37 | }; |
| 38 | } |
| 39 | } |
nothing calls this directly
no test coverage detected