Local Storage Variables in SAP UI5


icotxt_white_220x72_blue

You can define your global variables on index.html. Also you can set value like below:

window.localStorage.setItem(“variable_name”,”variable_value”)

To get variable value you can use the code below:

var oVariable = sap.ui.getCore().byId(“oVariable”);
oVariable.setValue(window.localStorage.getItem(“variable_name”));

 

Leave a comment

Your email address will not be published. Required fields are marked *