Hanna Alkaff
Hanna Alkaff

Reputation: 1

Side Menu Route

I'm trying to implement a side menu in my app ionic 5. but i can't seem to do so. when i run the app, it will go to home page but won't go to other pages like stats page, savings page. triedto look at the console log for errors but there were no errors.

This is my html page html page

This is routing-module.ts

routing module page

This is my console log page. Console page

It doesn't state any error but it won't go to the page i want either

Upvotes: 0

Views: 116

Answers (2)

Thanasis Saxanidis
Thanasis Saxanidis

Reputation: 141

You should also check your menu-rooting.module.ts to check if the pages are defined as children of the menu page.For example: children: [{path: 'statistics',loadChildren: () => import('../statistics/statistics.module').then(m => m.StatisticsPageModule)}]

Upvotes: 0

Manoj Kumar Surisetti
Manoj Kumar Surisetti

Reputation: 51

In the HTML code instead of routerLink="home" change it to [routerLink]="['/home']". Hope it will work.

Upvotes: 1

Related Questions