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

Not able to store to storage after http request

$
0
0

ok so it already stores to indexeddb, but when i try to do

this.store.get('token').then((val) => {
    console.log('Your token is ', String(val));

it returns ‘Your token is null’

the code sequence is as follows:

this.store.set('token', response.data.token);
this.store.set('public_id', response.data.public_id);
this.store.set('role_id', response.data.role_id);

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

Viewing all articles
Browse latest Browse all 230518