How to store local storage value in ionic to global variable in order to display it in a page

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

1 Like

Thank you Rupnesh it worked.