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


Code snippet:‘savedData’).then((data) => {

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.‘savedData’).then((data) => {
this.var_name = data[0].awb

// on html page you can directly access the varible {{var_name}}


Thank you Rupnesh it worked.