cleanup(zones): cleanup
This commit is contained in:
parent
9891312495
commit
cf8a5d2a0d
|
@ -91,7 +91,10 @@ export function bootstrap(appComponentType: Type, bindings=null) {
|
||||||
if (isPresent(bindings)) appInjector = appInjector.createChild(bindings);
|
if (isPresent(bindings)) appInjector = appInjector.createChild(bindings);
|
||||||
|
|
||||||
return appInjector.asyncGet(LifeCycle).
|
return appInjector.asyncGet(LifeCycle).
|
||||||
then((lc) => lc.registerWith(zone)).
|
then((lc) => {
|
||||||
|
lc.registerWith(zone);
|
||||||
|
lc.tick();
|
||||||
|
}).
|
||||||
then((_) => appInjector);
|
then((_) => appInjector);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ export class LifeCycle {
|
||||||
zone.initCallbacks({
|
zone.initCallbacks({
|
||||||
onTurnDone: () => this.tick()
|
onTurnDone: () => this.tick()
|
||||||
});
|
});
|
||||||
this.tick();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tick() {
|
tick() {
|
||||||
|
|
|
@ -32,5 +32,5 @@ class _Completer {
|
||||||
|
|
||||||
get promise => c.future;
|
get promise => c.future;
|
||||||
get complete => c.complete;
|
get complete => c.complete;
|
||||||
|
get reject => c.completeError;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue