Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230899

Ionic 4 Tab navigation params

$
0
0

Follow, below steps to pass data from tab to pages

In tabs.html

add tab=“profile/{{currentuserId}}”

<ion-tab-button mode=“ios” tab=“profile/{{currentuserId}}”>

In tab.ts

get firebase current userId or your Data Id
this.currentuserId = user.val().userId

now in tab.router.module.ts

add path: ‘profile/:id’,

const routes: Routes = [
{
path: ‘tabs’,
component: TabsPage,
children: [
{
path: ‘profile/:id’,
children: [
{
path: ‘’,
loadChildren: () =>
import(’…/profile/profile.module’).then(m => m.ProfilePageModule)
}
]
}
]…


Viewing all articles
Browse latest Browse all 230899

Trending Articles