title: query params are missing from the url in angular 6
body: <p>The url entered directly is not showing the query parameters in the url.</p>
  
  <p>i have given my route path as:</p>
  
  <pre><code>{ path: 'userdetails/:id', component: userdetailscomponent}
  </code></pre>
  
  <p>And my url is need to work as </p>
  
  <pre><code>https://www.(site).com/userdetails?id=5.
  </code></pre>
  
  <p>But the url is working as:</p>
  
  <pre><code>https://www.(site).com/userdetails
  </code></pre>
  
  <p>The query params is not showing when the url is directly opened in the browser. The query params are disappearing and the url is going to main route with out query param .How can i get the query param to work and is their any way to get the lost query params?</p>