我试图从离子存储中获取价值,但我正在从功能中获取价值。
let xyz = '';
this.storage.get('user').then(function (response) {
xyz = response.accessToken;
console.log('in',xyz );
});
console.log('out', xyz);
//I am getting the value in the console in but not getting the console out.
//I want to use that token out side of this function.How can I get this token from storage?