Hi I would like to perform the same effect at this video.
Being able to go to a sub page with the sub page on top of his parent. (the tabs is hidden)
On my ionic 7 project, I can’t implement this effect. I got some sort of black background color showing instead of the parent page, here is my code.
setupIonicReact(
{ navAnimation: iosTransitionAnimation }
);
const Tabs = () => {
return (
<IonTabs>
<IonRouterOutlet>
<Route exact path="/app/tab1" component={Tab1} />
</IonRouterOutlet>
<IonTabBar slot="bottom">
<IonTabButton tab="tab1" href="/app/tab1" >
<IonIcon icon={searchOutline} />
</IonTabButton>
</IonTabBar>
</IonTabs>
)
}
const Tab1: React.FC = () => {
return (
<IonPage>
<IonContent>
test tab1
<IonButton routerLink="/detailsonly" >go to detail</IonButton>
</IonContent>
</IonPage>
)
}
const Detail: React.FC = () => {
return (
<IonPage>
<IonHeader>
<IonToolbar>
<IonButtons slot="start">
<IonBackButton />
</IonButtons>
<IonTitle>Home</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent>
Detail page
</IonContent>
</IonPage>
)
}
const App: React.FC = () => (
<IonApp>
<IonReactRouter>
<IonRouterOutlet>
<Route path="/app" component={Tabs} />
<Route path="/detailsonly" component={Detail} />
</IonRouterOutlet>
</IonReactRouter>
</IonApp>
);
export default App;