0

I have three modules in angular (AppModule, ProductsModule and OrdersModule) with below configuration.

const appRoutes: Routes = [
  { path: '', component: HomeComponent, pathMatch: 'full' },
  { path: 'products', loadChildren: () => import('./products/products.module').then(
          m => m.ProductsModule) },
  { path: 'orders', loadChildren: () => import('./orders/orders.module').then(
          m => m.OrdersModule) },
];

In components of these modules, ActivatedRoute.snapshot.url does not have the first part of url (i.e. 'products' or 'orders'). How can I access to full URL?

0 Answers0