[SOLVED] Ionic routing with tabs in PWA toolkit

I cloned the PWA toolkit (https://github.com/ionic-team/ionic-pwa-toolkit) and try to convert the Ionic routing to a tabs based navigation routing. I wasn’t that successful. Anyone achieved that?

Like displayed in the doc, I was able to replace the routing with the tabs, respectively in app-root my render method:

render() {
        return (

                    <ion-tab tab="home" component="app-home">Home Content</ion-tab>
                    <ion-tab tab="settings" component="app-settings">Settings Content</ion-tab>

                    <ion-tab-bar slot="bottom">

                        <ion-tab-button tab="home">
                            <ion-icon name="home"></ion-icon>

                        <ion-tab-button tab="settings">
                            <ion-icon name="cog"></ion-icon>


but now I’m stuck trying to reimplement the profile routing aka I want to add a specific Ionic routing to the home tab in order to be able to navigation from that tab to a sub route respectively I would like to implement the following routing as the one of that particular tab

 <ion-router useHash={false}>
      <ion-route url="/" component="app-home" /> <!-- I want that one to be the root of the tab -->
      <ion-route url="/profile/:name" component="app-profile" /> <!-- this one as subpage -->
 <ion-nav />

Any idea?

Solved, there is a nice provided example in the Ionic conference app with Stencil. Just followed the example and everything went fine

1 Like