填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫Home

ServiceWorkerModule

      
      class ServiceWorkerModule {
  static register(script: string, opts: SwRegistrationOptions = {}): ModuleWithProviders<ServiceWorkerModule>
}
    

靜態方法

Register the given Angular Service Worker script.

      
      static register(script: string, opts: SwRegistrationOptions = {}): ModuleWithProviders<ServiceWorkerModule>
    
引數
script string
opts SwRegistrationOptions
可選. 預設值是 `{}`.
返回值

ModuleWithProviders<ServiceWorkerModule>

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.

提供商

提供商
      
      SwPush
    
      
      SwUpdate