how to use http params in angular 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: typescript interface to http params
public getData(p: ValueList) {
return this.httpClient.get(`${url}`, { params: new HttpParams({ fromObject: p}) });
}