Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const routes: Routes = [
- {
- path: '',
- component: InfoPage,
- pathMatch: 'full'
- },
- {
- path: 'item',
- component: ItemInfoPage
- }
- ];
- @NgModule({
- imports: [
- CommonModule,
- FormsModule,
- IonicModule,
- RouterModule.forChild(routes),
- ItemInfoPageModule
- ],
- declarations: [InfoPage, ]
- })
- export class InfoPageModule {}
- const routes: Routes = [
- {
- path: 'tabs',
- component: TabsPage,
- children: [
- {
- path: '',
- redirectTo: '/tabs/(home:home)',
- pathMatch: 'full',
- },
- {
- path: 'home',
- outlet: 'home',
- component: HomePage
- },
- {
- path: 'info',
- outlet: 'info',
- component: InfoPage
- },
- {
- path: 'about',
- outlet: 'about',
- component: AboutPage
- },
- {
- path: 'contact',
- outlet: 'contact',
- component: ContactPage
- }
- ]
- },
- {
- path: '',
- redirectTo: '/tabs/(home:home)',
- pathMatch: 'full'
- }
- ];
- @NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule]
- })
- export class TabsPageRoutingModule {}
- @NgModule({
- imports: [
- IonicModule,
- CommonModule,
- FormsModule,
- TabsPageRoutingModule,
- HomePageModule,
- AboutPageModule,
- ContactPageModule,
- InfoPageModule,
- ItemInfoPageModule
- ],
- declarations: [TabsPage]
- })
- export class TabsPageModule {}
Add Comment
Please, Sign In to add comment