I am trying to send page number and pagesize to webapi , but no parameter is passed , i have debugedd the app in vs code ,pagingModel has pageSize and PageNumber as member and they both have value, but when I open chrome dev tool there is no paramethere in request url is there something wrong with my code ?
getTasks(pagingModel: IPagingModel): Promise<TaskList> {
const url = this.taskUrl;
const params = new URLSearchParams();
let option: RequestOptions;
// tslint:disable-next-line:forin
for (const key in pagingModel) {
params.set(key, pagingModel[key]);
}
option = new RequestOptions( {search: params, params: params});
return this.http.get(url, option)
.toPromise()
.then(response => response.json() as TaskList)
.catch(this.handleError);
}

search: params, params: params- Calling both a parameter name and its variableparamsis a risky road to take.