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
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:
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:
app.routing.module
const routes: Routes = [
{path: 'services', loadChildren: () => import('./routes/services/services.module').then(m => m.ServicesModule)},
{ path: '', loadChildren: () => import('./routes/home/home.module').then(m => m.HomeModule) },
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: '**', pathMatch: 'full', redirectTo: ''},
];
home-routing.module
const routes: Routes = [{ path: '', component: HomeComponent, children: [
{ path: '', component: HomeStartingViewComponent },
{ path: '', component: MeetUsComponent },
{ path: '', component: ServiceItemsComponent },
{ path: '', component: TitleComponent },
{path:'', component:CaseStudyComponent},
{path: '', component:BenefitsComponent},
{path:'', component:PartnersComponent}],
}]
services-rouiting.module
const routes: Routes = [{ path: '', component: ServicesComponent, children: [
{path:'', component:TitleComponent}
] }];
The text was updated successfully, but these errors were encountered: