Skip to content

Commit b1bb1b7

Browse files
authored
docs(tabs): vue usage includes router outlet (#2685)
* Vue ion-router-outlet is missing, resulting in error this isn't an edit about wrong stuff or not, but it's not clear why is it missing the ion-router-outlet while if I added it as-is it warns me of the lack of an ion router outlet. and it's confusing for why it's not referenced here. in addition to that it's not clear where should I add the tabs component and the schedule component etc * docs(tabs): add router outlet imports to vue example
1 parent a9d7d71 commit b1bb1b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/api/tabs.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ will match the following tab:
369369
<template>
370370
<ion-page>
371371
<ion-tabs @ionTabsWillChange="beforeTabChange" @ionTabsDidChange="afterTabChange">
372+
<!-- https://ionicframework.com/docs/vue/navigation#working-with-tabs -->
373+
<ion-router-outlet></ion-router-outlet>
372374
<ion-tab-bar slot="bottom">
373375
<ion-tab-button tab="schedule" href="/tabs/schedule">
374376
<ion-icon :icon="calendar"></ion-icon>
@@ -391,14 +393,15 @@ import {
391393
IonIcon,
392394
IonLabel,
393395
IonPage,
396+
IonRouterOutlet,
394397
IonTabBar,
395398
IonTabButton,
396399
IonTabs
397400
} from '@ionic/vue';
398401
import { calendar, personCircle } from 'ionicons/icons';
399402
400403
export default defineComponent({
401-
components: { IonIcon, IonLabel, IonPage, IonTabBar, IonTabButton, IonTabs },
404+
components: { IonIcon, IonLabel, IonPage, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs },
402405
setup() {
403406
const beforeTabChange = () => {
404407
// do something before tab change
@@ -497,4 +500,4 @@ export default defineComponent({
497500
<CustomProps />
498501

499502
## Slots
500-
<Slots />
503+
<Slots />

0 commit comments

Comments
 (0)