I'm attempting to send multiple parameters to HttpParams in Angular 5 using the approach below:
paramsObject: any
params = new HttpParams();
for (let key in paramsObject) {
params.set(key, paramsObject[key]);
}
In previous versions of Angular, this method worked fine. However, with Angular 5 and its immutable HttpParams object, the parameters are not being set correctly and null values are being passed instead. Can someone help me figure out how to properly set multiple parameters to HttpParams? I am specifically working with Angular 5 and TypeScript.