Ionic tabs: cannot match any routes, but does work?

Published

In an Ionic app I’m developing I’m using tabs to navigate between different pages.

Even though they do work. Each navigation returns "Cannot match any routes" but does actually navigate. I cannot figure out what’s off.

My app-routing.module;

{
  path: 'ranking',
  loadChildren: () => import('./pages/ranking/ranking.module').then( m => m.RankingPageModule)
},

My ranking-routing.module

const routes: Routes = [
  {
    path: '',
    component: RankingPage,
    children: [
      {
        path: 'world-ranking',
        loadChildren: () =>
          import('./world-ranking/world-ranking.module').then(m => m.WorldRankingPageModule)
      },
      {
        path: 'country-ranking',
        loadChildren: () =>
          import('./country-ranking/country-ranking.module').then(m => m.CountryRankingPageModule)
      },
      {
        path: '',
        redirectTo: '/ranking/world-ranking',
        pathMatch: 'full'
      }
    ]
  },
];

Source: Angular Questions

Published
Categorized as angular, ionic-framework, tabs Tagged , ,

Answers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq