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));
});
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));
});