title: Why ActivatedRoute.queryParams is not working in Angular?
body: <p>I am using routing in my Angular app.</p>
  
  <p>I have bellow route in my routing module.</p>
  
  <pre><code>{
      path: 'user/:name',
      component: UserComponent,
  }
  </code></pre>
  
  <p>I am using <code>queryParams</code> of <code>ActivatedRoute</code> to get name from route. this is my code.</p>
  
  <pre><code>this.activatedRout.queryParams.subscribe( params =&gt; {
  
    this.user_name = params['name'];
  
  });
  </code></pre>
  
  <p>But <code>params</code> are undefined. please help me.</p>