angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

path in routeConfig not available anymore #440

Open alexandermikuta opened 6 years ago

alexandermikuta commented 6 years ago

Since the upgrade to Angular 6 (currently we use 6.0.2, but Problem also exists with Router 6.0.0) the value of routeConfig.path in ActivatedRouteSnapshot is not available anymore, also it is defined in our routes. According to the latest documentation at https://angular.io/api/router/ActivatedRouteSnapshot path is still (optional) part of routeConfig. I would expect the path defined like in Angular < 6.0.0 as it is defined in the routes. I could not find a breaking-change in the release-notes. Is there maybe an issue with this path-value? It looks like it may be related to this issue: https://github.com/angular/router/pull/350/commits/fc4c1950c40a40d4020199cef7ea26370a5bf3f1

related part of our routes-file (Problem occurs e.g. on route products/1):

const routes: Routes = [
  { path: 'products', component: ProductsComponent, canActivate: [AuthGuardService] },
  {
    path: 'products/:productId',
    component: ProductComponent,
    canActivate: [AuthGuardService],
    children: [...]
}]