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

Method componentWillLoad

core/src/components/tab/tab.tsx:34–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 @Prop() component?: ComponentRef;
33
34 async componentWillLoad() {
35 if (Build.isDev) {
36 if (this.component !== undefined && this.el.childElementCount > 0) {
37 printIonError(
38 '[ion-tab] - You can not use a lazy-loaded component in a tab and inlined content at the same time.' +
39 `- Remove the component attribute in: <ion-tab component="${this.component}">` +
40 ` or` +
41 `- Remove the embedded content inside the ion-tab: <ion-tab></ion-tab>`
42 );
43 }
44 }
45 if (this.active) {
46 await this.setActive();
47 }
48 }
49
50 /** Set the active component for the tab */
51 @Method()

Callers

nothing calls this directly

Calls 2

setActiveMethod · 0.95
printIonErrorFunction · 0.90

Tested by

no test coverage detected