I work with angular 7 
I create serice as below
service.ts  
getLocationData(ids: Array<number>) {      
        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);    
    }    
when i call service i get error on definition res as following :


this.partDetailsService.getLocationData(this.LocationIds).subscribe(res : 
Array<any> => {    
          
}  

my problem is res :array<any> give me error as not defined 
so how to solve this problem
res not accept to defined as array<any> on compile time 
so how to solve this problem

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/b47ed110-caa2-4577-9a8d-6210a02f36f2%40googlegroups.com.

Reply via email to