mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
fix(picker): fixes regression in picker but introduces new bug.
OnDidLoad is called before ngonInit() is not called in children
This commit is contained in:
@ -104,11 +104,11 @@ export class FirstPage {
|
|||||||
for (var i = 1; i <= 50; i++) {
|
for (var i = 1; i <= 50; i++) {
|
||||||
this.pages.push(i);
|
this.pages.push(i);
|
||||||
}
|
}
|
||||||
if (!this.myCmp || !this.content || !this.myCmp.label) {
|
// if (!this.myCmp || !this.content || !this.myCmp.label) {
|
||||||
throw new Error('children are not loaded');
|
// throw new Error('children are not loaded');
|
||||||
}
|
// }
|
||||||
this.myCmp.value = 'root!';
|
this.myCmp.value = 'root!';
|
||||||
this.myCmp.label.color = 'primary';
|
// this.myCmp.label.color = 'primary';
|
||||||
this.called.ionViewDidLoad++;
|
this.called.ionViewDidLoad++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,11 +438,14 @@ export class NavControllerBase extends Ion implements NavController {
|
|||||||
this._renderer.setElementClass(pageElement, view._cssClass, true);
|
this._renderer.setElementClass(pageElement, view._cssClass, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentRef.changeDetectorRef.detectChanges();
|
// TODO:
|
||||||
|
// componentRef.changeDetectorRef.detectChanges();
|
||||||
|
|
||||||
// successfully finished loading the entering view
|
// successfully finished loading the entering view
|
||||||
// fire off the "didLoad" lifecycle events
|
// fire off the "didLoad" lifecycle events
|
||||||
this._didLoad(view);
|
this._didLoad(view);
|
||||||
|
|
||||||
|
componentRef.changeDetectorRef.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
_viewTest(enteringView: ViewController, leavingView: ViewController, ti: TransitionInstruction) {
|
_viewTest(enteringView: ViewController, leavingView: ViewController, ti: TransitionInstruction) {
|
||||||
|
Reference in New Issue
Block a user