@angular/core

provideAppInitializer

function

The provided function is injected at application startup and executed during app initialization. If the function returns a Promise or an Observable, initialization does not complete until the Promise is resolved or the Observable is completed.

  
    function provideAppInitializer(  initializerFn: () => void | Observable<unknown> | Promise<unknown>): EnvironmentProviders;
  
  
Jump to details