title: Angular Get last part of url
body: <p>I want to get the last part of my url for example from <code>/item/:id/edit</code> I want to get <code>edit</code> or <code>/edit</code>.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/49684409/how-to-get-angular-5-route-segments-from-activatedroute">this Question here</a> but this doesnt work because I want to run this Code in the parent component and the whole url I get from this Code is <code>/item/:id</code>.</p>
  
  <p>How can I get the last part from it?</p>