Below a simplified version of my call to my Service.
Component:
for (let platform of this.platforms) {
this.artistsService.getFollowers(uuid, platform)
.subscribe((data: any[]) => { console.log(platform); })
}
Service:
getFollowers(uuid: string, platform: string): Observable<any[]> {
return this.http.get<any[]>(this.baseUrl + '/followers/' + platform + '/' + uuid + '?format=json', httpOptions)
.pipe(
catchError(this.handleError('getFollowers', []))
);
}
I would like the callback to remember the platform which was provided. At this moment I do not know from which platform the data is coming from.
Any ideas how a parameter can be remembered in the response?