ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

feat: using ion-tab-bar without ion-tabs or ion-router-outlet

Open z0lo13 opened this issue 7 months ago • 4 comments

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

[Vue warn]: injection "tabBarData" not found.
Vue warn]: Unhandled error during execution of native event handler 
  at <IonTabButton tab="3" > 
  at <IonTabBar color="light" > 
  at <Example> 
  at <IonContent class="ion-padding" > 
  at <IonApp> 
  at <App>

Expected Behavior

to work without the need of ion-tabs or router outlet. The navigation will be done by method.

Steps to Reproduce

https://stackblitz.com/edit/hknvlmdm

Code Reproduction URL

https://stackblitz.com/edit/hknvlmdm

Ionic Info

ionic info

Ionic:

Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 8.5.3

Capacitor:

Capacitor CLI : 7.2.0 @capacitor/android : 7.2.0 @capacitor/core : 7.2.0 @capacitor/ios : 7.2.0

Utility:

cordova-res : 0.15.4 native-run : 2.0.1

System:

NodeJS : v22.12.0 (/Users/z0lo/.nvm/versions/node/v22.12.0/bin/node) npm : 10.9.0 OS : macOS

Additional Information

No response

z0lo13 avatar Apr 15 '25 16:04 z0lo13

Try the ion-segment-view content. It's less opinionated about how you use it.

jacobg avatar Apr 21 '25 12:04 jacobg

@jacobg not sure how that could help, we only need the tab bar buttons. And routing is handled via router in method.

z0lo13 avatar Apr 21 '25 12:04 z0lo13

Thank you for the issue! I have marked this as a feature request as ion-tab-bar has always required an ion-tabs component.

brandyscarney avatar Apr 24 '25 20:04 brandyscarney

@brandyscarney it would also be great if the animation is present when navigating between tabs.

z0lo13 avatar May 01 '25 21:05 z0lo13