Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229670

Get Subscribe Data out of function

$
0
0
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


Viewing all articles
Browse latest Browse all 229670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>