title: how to append url with parameter in angular 2 type script?
body: <p>I have a problem regarding appending url params dynamically in angular 2. The angular 1 uses $location.search to add query params in the url. How could i achieve the same in Angular 2 ?   </p>
  
  <pre><code>//Api call to submit product details
  submit_product() {
                  let model = new AddProductModel(this.post_dict.name, this.post_dict.slug, 'N', 0, this.post_dict.display_sitewide, this.post_dict.display_in_party, JSON.parse(localStorage.getItem('bundled')), 'N', parseInt(JSON.parse(localStorage.getItem('categories'))));
                  this
                          .product
                          .addProduct(model)
                          .then(productObj =&gt; {
                                  if (productObj) {
                                          localStorage.removeItem('categories');
                                          // Here i wish to set the object id as the URL parameter;
                                          this.successMessage = 'Product Information added Successfully';
                                          this.timeoutMethod(true);
                                  }
                          })
                          .catch(error =&gt; {
                                  this.errorMessage = error.error.message;
                                  this.timeoutMethod(false);
                          })
  
          }
  </code></pre>
  
  <p>Any help would be really appreciated!! Thankss a tonnn.</p>