fix(service-worker): allow disabling SW while still using services
Currently, the way to not use the SW is to not install its module. However, this means that you can't inject any of its services. This change adds a ServiceWorkerModule.disabled() MWP, that still registers all of the right providers but acts as if the browser does not support Service Workers.
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
/** @experimental */
|
||||
export declare class ServiceWorkerModule {
|
||||
static register(script: string, opts?: RegistrationOptions): ModuleWithProviders;
|
||||
static register(script: string, opts?: {
|
||||
scope?: string;
|
||||
enabled?: boolean;
|
||||
}): ModuleWithProviders;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
|
Reference in New Issue
Block a user