MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / rootChanged

Method rootChanged

core/src/components/nav/nav.tsx:80–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

componentDidLoadMethod · 0.95

Calls 2

setRootMethod · 0.95
printIonWarningFunction · 0.90

Tested by

no test coverage detected