angular icon indicating copy to clipboard operation
angular copied to clipboard

Unable to access all router params from the service or the resolver.

Open naveen-murali opened this issue 1 year ago • 0 comments

Which @angular/* package(s) are the source of the bug?

router

Is this a regression?

Yes

Description

appRoutes = [
    {
       path: 'home',
       component: ConsoleBaseLayoutComponent,
       resolve: { data: GetEnvironmentListResolver },
       canActivate: [AuthGuardService],
       children: [
           {
                path: 'environment/:environmentId',
                component: EnvironmentLayoutComponent,
                children: [
                    { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
                    {
                        path: ':resource',
                        commonent: environmetChildrenComponent,
                        resolve: { data: EnvironmentResourceResolver },
                    },
                ],
           },
          ......
      ],
  },
  ......
];

Here in the EnvironmentResourceResolver, I am getting the :resource but not the parent params (ie, :environmentId).

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 12.2.3
Node: 14.17.3
Package Manager: npm 6.14.13
OS: linux x64

Angular: 12.2.3
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.3
@angular-devkit/build-angular   12.2.3
@angular-devkit/core            12.2.3
@angular-devkit/schematics      12.2.3
@angular/flex-layout            12.0.0-beta.34
@schematics/angular             12.2.3
rxjs                            6.6.3
typescript                      4.3.5

Anything else?

No response

naveen-murali avatar Aug 03 '22 12:08 naveen-murali