在 Ionic 4 中,我有一个带有选项卡的应用程序(5 页主页、搜索、地图、信息、关税) 从搜索页面我导航到详细信息页面,但我想将选项卡菜单保留在详细信息页面上。不知道有没有可能?
你如何配置路由?这是我的:
app-routing.module.ts
`const routes: Routes = [
{ path: '', loadChildren: './tabs/tabs.module#TabsPageModule' },
{ path: 'map', loadChildren: './map/map.module#MapPageModule' },
{ path: 'search', loadChildren: './search/search.module#SearchPageModule' },
{ path: 'station', loadChildren: './station/station.module#StationPageModule' },
{ path: 'info', loadChildren: './info/info.module#InfoPageModule' },
{ path: 'tarif', loadChildren: './tarif/tarif.module#TarifPageModule' }
];`
and my `tabs.router.module.ts`
`const routes: Routes = [
{
path: 'tabs',
component: TabsPage,
children: [
{
path: 'home',
outlet: 'home',
component: HomePage
},
{
path: 'search',
outlet: 'search',
component: SearchPage
},
{
path: 'map',
outlet: 'map',
component: MapPage
},
{
path: 'info',
outlet: 'info',
component: InfoPage
},
{
path: 'tarif',
outlet: 'tarif',
component: TarifPage
}
]
},
{
path: '',
redirectTo: '/tabs/(home:home)',
pathMatch: 'full'
}
];`
The station page must be a child page of Search page ?