Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

Core.js:6228 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'menu/home' Error: Cannot match any routes. URL Segment: 'menu/home' at ApplyRedirects.noMatchError (router.js:4396)

$
0
0

I’m having an issue when i click an item on my side menu errors appeared on the console

menu.module.ts

import { NgModule } from ‘@angular/core’;
import { CommonModule } from ‘@angular/common’;
import { FormsModule } from ‘@angular/forms’;
import { Routes, RouterModule } from ‘@angular/router’;

import { IonicModule } from ‘@ionic/angular’;

import { MenuPageRoutingModule } from ‘./menu-routing.module’;

import { MenuPage } from ‘./menu.page’;

const routes: Routes = [
{
path: ‘menu’,
component: MenuPage,
children : [
{
path: ‘home’,
loadChildren: () => import(’…/home/home.module’).then( m => m.HomePageModule)
},
{
path: ‘games’,
loadChildren: () => import(’…/games/games.module’).then( m => m.GamesPageModule)
},
{
path: ‘account’,
loadChildren: () => import(’…/account/account.module’).then( m => m.AccountPageModule)
},
{
path: ‘’,
redirectTo: ‘home’,
pathMatch: ‘full’
}

]

},
{
path: ‘’,
redirectTo:‘menu’,
pathMatch: ‘full’
}
];

@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
MenuPageRoutingModule
],
declarations: [MenuPage]
})
export class MenuPageModule {}


app-routing.module.ts

import { NgModule } from ‘@angular/core’;
import { PreloadAllModules, RouterModule, Routes } from ‘@angular/router’;

const routes: Routes = [
{
path: ‘’,
loadChildren: () => import(’./pages/menu/menu.module’).then( m => m.MenuPageModule)
}
];

@NgModule({
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
],
exports: [RouterModule]
})
export class AppRoutingModule { }

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>