title: Angular router: how to replace param?
body: <p>Let's suppose I've got 3 urls:
  <code>/:projectId/info</code>,
  <code>/:projectId/users</code>,
  <code>/:projectId/users/:userId/profile</code>. All of them have param <code>projectId</code>. UI has a component to switch from one project to another. So I need:  </p>
  
  <ol>
  <li>Get current URL</li>
  <li>Change param by name (e.g. projectId)</li>
  <li>Navigate to new url</li>
  </ol>
  
  <p>So I need something like <code>this.router.replaceParam(currentUrl, {projectId: 'project_id_2'})</code> which will transform <code>/project_id_1/users/user_id_1/profile</code> into <code>/project_id_2/users/user_id_1/profile</code> (and any other URL with <code>:projectId</code> param)</p>
  
  <p>I thought it's a simple and common problem but didn't find a solution in 1 hour. Suggested <a href="https://github.com/angular/angular/issues/13562" rel="noreferrer">here</a> solution doesn't work as noted in the last comment</p>