fix(modal): canEnter is called in modals

This commit is contained in:
Manu Mtz.-Almeida
2016-10-12 22:56:24 +02:00
parent 1300cbd7c0
commit a40b42c055

View File

@ -432,6 +432,7 @@ export class NavControllerBase extends Ion implements NavController {
// create ComponentRef and set it to the entering view // create ComponentRef and set it to the entering view
enteringView.init(componentFactory.create(childInjector, [])); enteringView.init(componentFactory.create(childInjector, []));
enteringView._state = ViewState.INITIALIZED; enteringView._state = ViewState.INITIALIZED;
this._willLoad(enteringView);
} }
_viewTest(enteringView: ViewController, leavingView: ViewController, ti: TransitionInstruction) { _viewTest(enteringView: ViewController, leavingView: ViewController, ti: TransitionInstruction) {
@ -549,7 +550,6 @@ export class NavControllerBase extends Ion implements NavController {
_viewInsert(view: ViewController, componentRef: ComponentRef<any>, viewport: ViewContainerRef) { _viewInsert(view: ViewController, componentRef: ComponentRef<any>, viewport: ViewContainerRef) {
// 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._willLoad(view);
this._didLoad(view); this._didLoad(view);
// render the component ref instance to the DOM // render the component ref instance to the DOM