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