get all pages params angular http code example
Example 1: angular httpclient query params not working
getLogs(logNamespace): Observable<any> {
// Setup log namespace query parameter
let params = new HttpParams().set('logNamespace', logNamespace);
return this._HttpClient.get(`${API_URL}/api/v1/data/logs`, { params: params })
}
Example 2: angular set url parameters
//in your HTML code :
<a href="javascript:;" routerLink="/link/params">
My link
</a>
// app-routing.module.ts:
//in your Routes array :
{path: '/link/:paramsName', component: MyComponent }