[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/service-worker/ServiceWorkerModule [Back]  [Original]

ServiceWorkerModule Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/service-worker

ServiceWorkerModule

NgModule
stable
Custom service worker scriptService worker configuration

On this page

    arrow_upward_alt Back to the top

    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
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page