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