mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
fix(modal): set root nav view controller
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import {App, Page, Config, Platform} from 'ionic/ionic';
|
||||
import {Modal, ActionSheet, NavController, NavParams, Animation, ViewController} from 'ionic/ionic';
|
||||
import {Modal, ActionSheet, NavController, NavParams, Transition, ViewController} from 'ionic/ionic';
|
||||
|
||||
|
||||
@Page({
|
||||
@ -284,8 +284,8 @@ class E2EApp {
|
||||
}
|
||||
|
||||
|
||||
class FadeIn extends Animation {
|
||||
constructor(enteringView, leavingView) {
|
||||
class FadeIn extends Transition {
|
||||
constructor(enteringView: ViewController, leavingView: ViewController) {
|
||||
super(enteringView.pageRef());
|
||||
this
|
||||
.easing('ease')
|
||||
@ -295,10 +295,10 @@ class FadeIn extends Animation {
|
||||
.before.addClass('show-page');
|
||||
}
|
||||
}
|
||||
Animation.register('my-fade-in', FadeIn);
|
||||
Transition.register('my-fade-in', FadeIn);
|
||||
|
||||
class FadeOut extends Animation {
|
||||
constructor(enteringView, leavingView) {
|
||||
class FadeOut extends Transition {
|
||||
constructor(enteringView: ViewController, leavingView: ViewController) {
|
||||
super(leavingView.pageRef());
|
||||
this
|
||||
.easing('ease')
|
||||
@ -307,4 +307,4 @@ class FadeOut extends Animation {
|
||||
.before.addClass('show-page');
|
||||
}
|
||||
}
|
||||
Animation.register('my-fade-out', FadeOut);
|
||||
Transition.register('my-fade-out', FadeOut);
|
||||
|
@ -416,6 +416,8 @@ export class NavController extends Ion {
|
||||
return;
|
||||
}
|
||||
|
||||
enteringView.setNav(rootNav);
|
||||
|
||||
opts.keyboardClose = false;
|
||||
opts.direction = 'forward';
|
||||
|
||||
|
@ -16,6 +16,7 @@ export * from './util/events'
|
||||
export * from './util/keyboard'
|
||||
|
||||
export * from './animations/animation'
|
||||
export * from './transitions/transition'
|
||||
|
||||
export * from './translation/translate'
|
||||
export * from './translation/translate_pipe'
|
||||
|
Reference in New Issue
Block a user