Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Created May 19, 2022 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/05e8751fbc3b5317a64e27b7d741e9fc to your computer and use it in GitHub Desktop.
Save NetanelBasal/05e8751fbc3b5317a64e27b7d741e9fc to your computer and use it in GitHub Desktop.
import { ENVIRONMENT_INITIALIZER, inject } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
bootstrapApplication(AppComponent, {
providers: [
{
provide: ENVIRONMENT_INITIALIZER,
multi: true,
useValue() {
inject(FooService).init()
}
}
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment