Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48983

How to use response outside the function?

$
0
0

In response, there is only one value. So how can I use that response outside of function?
Whenever I tried to use outside function it is showing in console undefined.

this.adminService.getlastfid().subscribe( response =>{
this.lastid = response ;
//console.log(data)
});

let l_id = this.lastid;
console.log(l_id);

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles



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