Code snippet:
this.storage.get(‘savedData’).then((data) => {
console.log(data[0].awb);
});
I want to display data in data[0].awb to the page. How to save it in a local variable in order to display the same?
Code snippet:
this.storage.get(‘savedData’).then((data) => {
console.log(data[0].awb);
});
I want to display data in data[0].awb to the page. How to save it in a local variable in order to display the same?
var_name:any; //declare variable globally.
this.storage.get(‘savedData’).then((data) => {
console.log(data[0].awb);
this.var_name = data[0].awb
});
// on html page you can directly access the varible {{var_name}}
Thank you Rupnesh it worked.