title: Subscribe on route.queryParams and route.params at the same time
body: <p>I have next URL with both <code>route.params</code> and <code>route.queryParams</code></p>
  
  <pre><code>.../search/VALUE1?method=VALUE2
  </code></pre>
  
  <p>I have created route</p>
  
  <pre><code>{
    path : 'search/:id',
    component: MyComponent
  }
  </code></pre>
  
  <p>Component</p>
  
  <pre><code>export class MyComponent {
  ...
  constructor(private route: ActivatedRoute) {}
  ngOnInit() {
    combineLatest(this.route.queryParams, this.route.params)
      .subscribe([queryParams, params] =&gt; {
         console.log(ID:' + params('id') + ',M:' +queryParams('method'));
         // code
      })
  }
  </code></pre>
  
  <p>But there is a problem - when user changes main param and query param at the same time - then subscribtion will be called twice, e.g.
  user calls </p>
  
  <pre><code>.../search/VALUE1?method=VALUE2
  .../search/VALUE3?method=VALUE4
  </code></pre>
  
  <p>Console log</p>
  
  <pre><code>ID:VALUE1,M:VALUE2
  ID:VALUE3,M:VALUE2   &lt;-- redundant method call
  ID:VALUE3,M:VALUE4
  </code></pre>
  
  <p>How to subscribe on both <code>route.params</code>, <code>route.queryParams</code> but call subscribtion only once?</p>
  
  <p><strong>What tried</strong></p>
  
  <pre><code>     private method: string;
  //
       ngOnInit() {
         this.route.queryParams.subscribe(
            queryParams =&gt; {
               this.method = queryParams['method'];
         });
  
         this.route.params.subscribe(
            params =&gt; {
               console.log(ID:' + params('id') + ',M:' + this.method);
               // code
  
            }
       }
  </code></pre>
  
  <p>And this works perfectly.
  But can I be sure that <code>this.method</code> will contain correct value at the subscribtion?</p>