title: How to replace one parameter in Vuejs router
body: <p>We have a multi-level multi-tenant application, where the hostname identifies the 'supplier' account, but the customer account is actually part of the URL.</p>
  
  <p>For instance, we have routes set up as follows:</p>
  
  <pre><code>/:locale/app/:customer_id/invoices
  </code></pre>
  
  <p>At the top of the page, we have a drop down with all customer ID's the user has access to.  The idea basically is that when a user changes the customer, the route changes from  <code>/nl/app/4/invoices</code> to <code>/nl/app/5/invoices</code>for instance.  So basically what I want to do is tell VueJs router to take the current route, and just change one parameter value in that route.</p>
  
  <p>As you can imagine: the same goes for the <code>:locale</code> parameter where we basically have a language switch on top.</p>
  
  <p>I know you can use <code>$router.push</code> in combination with a named route, and pass the current params in, replacing the params I want to update, but that would mean I'd have to name every route, and I'd need to know what the routes name is when I do an update.</p>
  
  <p>Isn't there a way to just ask VueJS Router to "give me the current route", and update one parameter?</p>
  
  <p>I've searched a lot on SO as well as through other resources, but so far did not get a good result...</p>