title: How to decode the URL when navigating one route to another roue in angular 5?
body: <p>I want to navigate a page from one route another route with query parameters.</p>
  
  <pre><code>var name = "engine &amp; machinery";
  
  this.router.navigateByUrl('dashboard?isopen='+true+'&amp;name='+name);
  </code></pre>
  
  <p>From this, route navigate to dashboard page but query parameters not coming properly.</p>
  
  <p>Url comes like, </p>
  
  <pre><code>http://localhost:4200/dashboard?isopen=true&amp;name=engine%20&amp;%20machinery=
  </code></pre>
  
  <p>Getting query parameters by the following code,</p>
  
  <pre><code>console.log("testt", this.route.snapshot.queryParamMap.get('name'));
  </code></pre>
  
  <p>its return only the <code>"engine"</code>.</p>
  
  <p>So, anyone help me for decoding the url and how to get the parameter value?</p>
  
  <p>Thanks in advance</p>