fix(nav): ionViewDidLoad fires before children components have been loaded

fixes #8449
This commit is contained in:
Manu Mtz.-Almeida
2016-10-24 23:12:07 +02:00
parent 6484c501fa
commit e89f3b0206
2 changed files with 57 additions and 9 deletions

View File

@ -425,10 +425,6 @@ export class NavControllerBase extends Ion implements NavController {
_viewAttachToDOM(view: ViewController, componentRef: ComponentRef<any>, viewport: ViewContainerRef) {
assert(view._state === ViewState.INITIALIZED, 'view state must be INITIALIZED');
// successfully finished loading the entering view
// fire off the "didLoad" lifecycle events
this._didLoad(view);
// render the component ref instance to the DOM
// ******** DOM WRITE ****************
viewport.insert(componentRef.hostView, viewport.length);
@ -443,6 +439,10 @@ export class NavControllerBase extends Ion implements NavController {
}
componentRef.changeDetectorRef.detectChanges();
// successfully finished loading the entering view
// fire off the "didLoad" lifecycle events
this._didLoad(view);
}
_viewTest(enteringView: ViewController, leavingView: ViewController, ti: TransitionInstruction) {