angular http queryparams code example
Example 1: angular http request query params
request(query) {
let params = new HttpParams().set("keyword", query);
return this.http.get(`Your_URL`, {params});
}
Example 2: queryparams angular
goProducts() {
this.router.navigate(['/products'], { queryParams: { order: 'popular' } });
}