getData() {
this.httpClient.get('url').subscribe(
data => {
this.incomingdata = data as any[]; // FILL THE ARRAY WITH DATA.
},
);
return this.incomingdata; //how can I return above data here
}
i have also same problem ,how can i use" this.incomingdata" out side of the function