I want to extract multiple parameters from url. Suppose the url is like
www.example.com/parent-component/2/list/child-component/5/list
I want to extract the parameters 2 and 5
The link on parent component is
[routerLink]="['/loggedIn','warehouse','move-request',moveRequest.id, 'issued-inventory',issuedInventory.id,'list']"
In the respective routes file i am doing this
{path:':move/issued-inventory',component:IssueInventoryComponent, children : ISSUED_INVENTORY_ROUTES}
The child route file is
{path:':myid/list',component:ListIssueInventoryComponent},
In the following component i want to access both variables move and myid
this.sub = this.activatedRoute.params.subscribe((params : Params) =>
{
this.moveRequestId = params['move'];
});
On Console the moveRequestId is undefined
What am i doing wrong? How to access those variables?
Router Version : "@angular/router": "^3.3.1"