feat(nav): support for rootParams

This commit is contained in:
Manu Mtz.-Almeida
2018-03-19 17:10:30 +01:00
parent 176d4994d1
commit 50abcf5ab3

View File

@ -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.');
} }