I work with angular 7
I create serice as below
- service.ts
- getLocationData(ids: Array
) { - let observableBatch = [];
- ids.forEach((id) => {
- observableBatch.push(
- this.http.get('http://192.168.7.45:9200/location/_doc/'+id)
- .map(res => res ));
- });
- return Observable.forkJoin(observableBatch);
- }
- this.partDetailsService.getLocationData(this.LocationIds).subscribe(res : Array => {
- }
so how to solve this problem
res not accept to defined as array on compile time
so how to solve this problem
ahmed elbarbaryPosted Jan 1, 2020, 1:10 AM
Laxmidhar SahooPosted Jan 1, 2020, 12:36 AM