title: How to convert JSON to query string in angular2?
body: <p>I'm new to Angular2. I have a JSON object, as below:</p>
  
  <pre><code>var options = {
    param1: "parama1",
    param2: "parama2",
    param3: "parama3"
  };
  </code></pre>
  
  <p>which should convert to query string and append to an external URL to redirect the page like below:</p>
  
  <pre><code>ngOnInit(){
       window.location.href = someurl?param1=param1&amp;param2=param2&amp;param3=param3;
  }
  </code></pre>
  
  <p>I'm looking for a way to convert it to query string.  In JQuery, <code>$.param()</code> and in AngularJS <code>$httpParamSerializerJQLike()</code> are there for this. I'd searched, but I got nothing. I want to know is there any way to do it in angular2.</p>