MCPcopy Create free account
hub / github.com/angular/angular / provideServiceWorker

Function provideServiceWorker

packages/service-worker/src/provider.ts:239–254  ·  view source on GitHub ↗
(
  script: string,
  options: SwRegistrationOptions = {},
)

Source from the content-addressed store, hash-verified

237 *
238 */
239export function provideServiceWorker(
240 script: string,
241 options: SwRegistrationOptions = {},
242): EnvironmentProviders {
243 return makeEnvironmentProviders([
244 SwPush,
245 SwUpdate,
246 {provide: SCRIPT, useValue: script},
247 {provide: SwRegistrationOptions, useValue: options},
248 {
249 provide: NgswCommChannel,
250 useFactory: ngswCommChannelFactory,
251 },
252 provideAppInitializer(ngswAppInitializer),
253 ]);
254}

Callers 3

configTestBedFunction · 0.90
registerMethod · 0.90

Calls 2

makeEnvironmentProvidersFunction · 0.90
provideAppInitializerFunction · 0.90

Tested by

no test coverage detected