feat(bootstrap): add platform and app initializers#5355
Conversation
There was a problem hiding this comment.
Because we are removing items from the collection while iterating over it. This never worked.
There was a problem hiding this comment.
lol
On Wed, Nov 18, 2015 at 8:35 AM Victor Savkin notifications@github.com
wrote:
In modules/angular2/src/core/application_ref.ts
#5355 (comment):@@ -439,7 +465,7 @@ export class ApplicationRef_ extends ApplicationRef {
dispose(): void {
// TODO(alxhub): Dispose of the NgZone.
- this._rootComponents.forEach((ref) => ref.dispose());
- ListWrapper.clone(this._rootComponents).forEach((ref) => ref.dispose());
Because we are removing items from the collection while iterating over it.
This never worked.—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/5355/files#r45223098.
|
overall this looks good to me. please answer the questions above and merge. |
|
and get CI to pass |
c047443 to
acfd8bb
Compare
Often some init logic needs to run when a platform or an application is boostrapped.
For example, boostraping a platform requires initializing the dom adapter.
Now, it can be done as follows:
new Provider(PLATFORM_INITIALIZER, {useValue: initDomAdapter, multi: true}),
All platform initializers will be run after the platform injector has been created.
Similarly, all application initializers will be run after the app injector has been
created.
acfd8bb to
ed1cbb7
Compare
|
Merging PR #5355 on behalf of @alxhub to branch presubmit-alxhub-pr-5355. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Often some init logic needs to run when a platform or an application is boostrapped.
For example, boostraping a platform requires initializing the dom adapter.
Now, it can be done as follows:
new Provider(PLATFORM_INITIALIZER, {useValue: initDomAdapter, multi: true}),
All platform initializers will be run after the platform injector has been created.
Similarly, all application initializers will be run after the app injector has been
created.