hi
i make login form
after succesfull login i save userID with storage like this
this.storage.set('Is_logged', "true");
and i want when the page load first check if Is_logged == true alert me
this is my code
this.storage.get('Is_logged').then((Is_logged) => {
this.Is_logged = JSON.parse(Is_logged);
console.log(this.Is_logged);
})
if (this.Is_logged === 'true') {
alert("true!!!");
}
else {
alert("false");
}
but it always alert false
where is problem ?
any idea ?