title: How to pass parameters from one component to another, using ? and & operators in url
body: <p>How to pass parameters from one component to another?
  Currently I'm passing using <strong>ActivatedRoute</strong>.</p>
  
  <p>In component1.ts</p>
  
  <pre><code>this.router.navigate(['/rate-list', 1]);
  </code></pre>
  
  <p>In app.module.ts</p>
  
  <pre><code>{ path: 'rate-list/:a', pathMatch: 'full', component: 
  RateListComponent },
  </code></pre>
  
  <p>in component2.ts</p>
  
  <pre><code>ngOnInit() {
  this.parameter.sub = this.route.params.subscribe(params =&gt; {
    this.parameter.a = params['a'];
    console.log(this.parameter.a);
  });
  }
  </code></pre>
  
  <p>this is working perfectly fine. This is creating url as <strong><a href="http://localhost:4200/rate-list/1" rel="nofollow noreferrer">http://localhost:4200/rate-list/1</a></strong> but I want to create <strong><a href="http://localhost:4200/rate-list?a=1" rel="nofollow noreferrer">http://localhost:4200/rate-list?a=1</a></strong>, this kind of url.
  Is it possible to create such a url. If yes, then how?</p>