title: How to create HttpParams using object for HTTP request on Angular 4.3 using HttpClient
body: <p>I have exactly angular version 4.3.2 and I cannot update because of dependencies. So for now I stick to this version. I have object with dynamic params (there can be other keys and values inside):</p>
  
  <pre><code>let query = {
      param1: 1,
      param2: 'a'
  }
  </code></pre>
  
  <p>and I want to do something like:</p>
  
  <pre><code>params = new HttpParams();
  params = params.append(query);
  return this.httpClient.get(this.config.apiUrl + '/items', {
              params: params,
              headers: headers
          });
  </code></pre>
  
  <p>but there is not such params.append(query) method. So I need to iterate over the query keys and to add them one by one to the params. Is there easier solution for this?</p>
  
  <p>Edit1:</p>
  
  <p>according this answer this can be done since angular 5.0.0-beta.6 (2017-09-03), but is not solution for me.
  <a href="https://stackoverflow.com/a/46317900/1995258">https://stackoverflow.com/a/46317900/1995258</a></p>