I'm trying to make an api call passing an array of id
in my page.ts:
this.myService.getPassingID(['1', '2'])
.subscribe((val) => console.log("val", val))
in my service:
getPassingID(id): Observable<any>{
let params = new HttpParams()
.set("id", id)
let url = apiURL
return this.http.get(url, {params});
}
I have tried in this way but I receive 500 error. How can I pass array in api call?