@ionic/core
Version:
Base components for Ionic
28 lines (27 loc) • 761 B
JavaScript
export class NavSetRoot {
push() {
const nav = this.el.closest('ion-nav');
const toPush = this.component;
if (nav && toPush !== undefined) {
nav.setRoot(toPush, this.componentProps, { skipIfBusy: true });
}
}
static get is() { return "ion-nav-set-root"; }
static get properties() { return {
"component": {
"type": String,
"attr": "component"
},
"componentProps": {
"type": "Any",
"attr": "component-props"
},
"el": {
"elementRef": true
}
}; }
static get listeners() { return [{
"name": "child:click",
"method": "push"
}]; }
}