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

Not able to store to storage after http request

$
0
0

set and get will be asynchronous, and if you legitimately only need ‘token’ then I’d say do

this.store.set('token', response.data.token)
.then(_ => this.storage.get('token'))
.then(val => {
  console.log('Your token is ', String(val));
});

Viewing all articles
Browse latest Browse all 230489

Trending Articles



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