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

Function provideAppInitializer

packages/core/src/application/application_init.ts:193–203  ·  view source on GitHub ↗
(
  initializerFn: () => Observable<unknown> | Promise<unknown> | void,
)

Source from the content-addressed store, hash-verified

191 * @publicApi
192 */
193export function provideAppInitializer(
194 initializerFn: () => Observable<unknown> | Promise<unknown> | void,
195): EnvironmentProviders {
196 return makeEnvironmentProviders([
197 {
198 provide: APP_INITIALIZER,
199 multi: true,
200 useValue: initializerFn,
201 },
202 ]);
203}
204
205/**
206 * A class that reflects the state of running {@link APP_INITIALIZER} functions.

Callers 11

provideServiceWorkerFunction · 0.90
TestClass · 0.90
bootstrap_spec.tsFile · 0.90
AppModuleClass · 0.90
app.config.tsFile · 0.90
provideSettingsFunction · 0.90
app.config.tsFile · 0.90

Calls 1

makeEnvironmentProvidersFunction · 0.90

Tested by

no test coverage detected