()
| 78 | |
| 79 | @Watch('root') |
| 80 | rootChanged() { |
| 81 | const isDev = Build.isDev; |
| 82 | |
| 83 | if (this.root === undefined) { |
| 84 | return; |
| 85 | } |
| 86 | |
| 87 | if (this.didLoad === false) { |
| 88 | /** |
| 89 | * If the component has not loaded yet, we can skip setting up the root component. |
| 90 | * It will be called when `componentDidLoad` fires. |
| 91 | */ |
| 92 | return; |
| 93 | } |
| 94 | |
| 95 | if (!this.useRouter) { |
| 96 | if (this.root !== undefined) { |
| 97 | this.setRoot(this.root, this.rootParams); |
| 98 | } |
| 99 | } else if (isDev) { |
| 100 | printIonWarning('[ion-nav] - A root attribute is not supported when using ion-router.', this.el); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Event fired when Nav will load a component |
no test coverage detected