You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular routing keeps redirecting me to the home page #26
I am facing a issues with the routing in Angular .It keeps redirecting me to the home page even though I am entering a valid url (http://localhost:4200/services)
This is my code:
Activity
kartik1211 commentedon Jan 7, 2026
Cause 1: Two ‘’ routes at the top level
{ path: '', loadChildren: () => import('./routes/home/home.module').then(m => m.HomeModule) },
{ path: '', redirectTo: 'home', pathMatch: 'full' },
Angular matches routes top to bottom.
The first path: '' already matches every URL, including /services.
Cause 2:
Multiple empty child routes.