在 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
}, …Run Code Online (Sandbox Code Playgroud)