0

im trying ionic for the first time. I created a project using the template TABS and im trying to add a new page with new botton in the bottom menu. I did this:

1) ionic generate page helloworld

2) In tabs-routing.module.ts i added the new route:

const routes: Routes = [
    {
        path: 'tabs',
        component: TabsPage,
        children: [
            {
                path: 'home',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../helloworld/helloworld.module').then(m => m.HelloworldPageModule)
                    }
                ]
            },
            {
                path: 'tab1',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
                    }
                ]
            },
            {
                path: 'tab2',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
                    }
                ]
            },
            {
                path: 'tab3',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)
                    }
                ]
            },
            {
                path: '',
                redirectTo: '/tabs/home',
                pathMatch: 'full'
            }
        ]
    },
    {
        path: '',
        redirectTo: '/tabs/home',
        pathMatch: 'full'
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class TabsPageRoutingModule {
}

In tabs.page.html i added

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

But this is the error: https://aws1.discourse-cdn.com/ionicframework/original/3X/b/e/bebad2c6927130e1c0d733b75ea0b3864e59faa4.png

Toriga
  • 189
  • 2
  • 7
  • 17

1 Answers1

0

I dont know. But i deleted this page, and stopped the server, i did again all like before, and now work.

Toriga
  • 189
  • 2
  • 7
  • 17