Created
September 19, 2022 12:20
-
-
Save NetanelBasal/c1db12e41e775ecf1589fab2103df977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ENVIRONMENT_INITIALIZER, Provider } from '@angular/core'; | |
export function attachInitEffect(fn: VoidFunction): Provider { | |
return { | |
multi: true, | |
provide: ENVIRONMENT_INITIALIZER, | |
useValue: fn, | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment