refactor(core): Introduce AppInitStatus

This class allows any provider to know and wait for the initialization of the
application. This functionality previously was tied to `ApplicationRef`.

BREAKING CHANGE:
- `ApplicationRef.waitForAsyncInitializers` is deprecated. Use 
  `AppInitStatus.donePromise` / `AppInitStatus.done` instead.
This commit is contained in:
Tobias Bosch
2016-08-02 07:38:14 -07:00
parent 7e4fd7d7da
commit 630028350a
7 changed files with 147 additions and 31 deletions

View File

@ -47,12 +47,6 @@ function _randomChar(): string {
*/
export const PLATFORM_INITIALIZER: any = new OpaqueToken('Platform Initializer');
/**
* A function that will be executed when an application is initialized.
* @experimental
*/
export const APP_INITIALIZER: any = new OpaqueToken('Application Initializer');
/**
* All callbacks provided via this token will be called when a component has been bootstrapped.
*