Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class ApplicationInitStatus {
- constructor(@Inject(APP_INITIALIZER)private appInits) { }
- runInitializers() {
- const asyncInitPromises = [];
- if (this.appInits) {
- for (let i = 0; i < this.appInits.length; i++) {
- const initResult = this.appInits[i]();
- if (isPromise(initResult)) {
- asyncInitPromises.push(initResult);
- }
- }
- }
- Promise.all(asyncInitPromises).then(() => { complete(); })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement