Spec-Zone.ru › Angular

ServiceWorkerModule

Custom service worker scriptService worker configuration

API

class ServiceWorkerModule {
  static register(script: string, options?: SwRegistrationOptions): ModuleWithProviders<ServiceWorkerModule>;
}

register

ModuleWithProviders<ServiceWorkerModule>

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.

@paramscriptstring
@paramoptionsSwRegistrationOptions
@returnsModuleWithProviders<ServiceWorkerModule>

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/service-worker/ServiceWorkerModule

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API