mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(nav): support for rootParams
This commit is contained in:
@ -57,12 +57,13 @@ export class NavControllerBase implements NavOutlet {
|
|||||||
|
|
||||||
@Prop({ connect: 'ion-animation-controller' }) animationCtrl: HTMLIonAnimationControllerElement;
|
@Prop({ connect: 'ion-animation-controller' }) animationCtrl: HTMLIonAnimationControllerElement;
|
||||||
@Prop({mutable: true}) swipeBackEnabled: boolean;
|
@Prop({mutable: true}) swipeBackEnabled: boolean;
|
||||||
|
@Prop() rootParams: any;
|
||||||
@Prop() root: any;
|
@Prop() root: any;
|
||||||
@Watch('root')
|
@Watch('root')
|
||||||
rootChanged() {
|
rootChanged() {
|
||||||
if (this.root) {
|
if (this.root) {
|
||||||
if (!this.useRouter) {
|
if (!this.useRouter) {
|
||||||
this.setRoot(this.root);
|
this.setRoot(this.root, this.rootParams);
|
||||||
} else if (Build.isDev) {
|
} else if (Build.isDev) {
|
||||||
console.warn('<ion-nav> does not support a root attribute when using ion-router.');
|
console.warn('<ion-nav> does not support a root attribute when using ion-router.');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user