title: How to keep query parameters in angular 5 on all routes by default?
body: <h3>Background:</h3>
  <p>The user calls the app's url with the parameters and uses my app. While switching between different routes the url parameters should be kept visible in the browser's address bar.</p>
  <hr />
  <p>I have to keep the query parameters on each route of my app. That means if I have the url</p>
  <p><code>www.example.com/app/test?id=326748798342&amp;state=1</code></p>
  <p>and call a link with <code>[routerLink]=&quot;['/login']&quot;</code> I have to get this url:</p>
  <p><code>www.example.com/app/login?id=326748798342&amp;state=1</code>.</p>
  <p>On default I get the login route without the parameters. I found one solution that says to set <code>queryParamsHandling='merge'</code>. But this is a very bad solution because that would mean to change all links in templates and all navigate() calls.</p>
  <p>Is there a cleaner way to solve this problem on default? Something such setting queryParamsHandling in the routes array for the app or something else?</p>