Skip to content

Commit

Permalink
fix(picker): fixes regression in picker but introduces new bug.
Browse files Browse the repository at this point in the history
OnDidLoad is called before ngonInit() is not called in children
  • Loading branch information
manucorporat committed Oct 26, 2016
1 parent 837ca76 commit c1ba120
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/components/nav/test/basic/app-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ export class FirstPage {
for (var i = 1; i <= 50; i++) {
this.pages.push(i);
}
if (!this.myCmp || !this.content || !this.myCmp.label) {
throw new Error('children are not loaded');
}
// if (!this.myCmp || !this.content || !this.myCmp.label) {
// throw new Error('children are not loaded');
// }
this.myCmp.value = 'root!';
this.myCmp.label.color = 'primary';
// this.myCmp.label.color = 'primary';
this.called.ionViewDidLoad++;
}

Expand Down
5 changes: 4 additions & 1 deletion src/navigation/nav-controller-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,14 @@ export class NavControllerBase extends Ion implements NavController {
this._renderer.setElementClass(pageElement, view._cssClass, true);
}

componentRef.changeDetectorRef.detectChanges();
// TODO:
// componentRef.changeDetectorRef.detectChanges();

// successfully finished loading the entering view
// fire off the "didLoad" lifecycle events
this._didLoad(view);

componentRef.changeDetectorRef.detectChanges();
}

_viewTest(enteringView: ViewController, leavingView: ViewController, ti: TransitionInstruction) {
Expand Down

0 comments on commit c1ba120

Please sign in to comment.