Skip to Content
1
Nov 11, 2013 at 04:29 AM

Call a globally declared variable in the Controller from view in mvc ui5?

592 Views

Hi,

i am facing problem in calling a globally declared variable in view to controller.How to call the variable in the controller?

eg:

view.js file

sap.ui.jsview("Race.One_Project", {

var load=true;

}

controller.js file

sap.ui.controller("Race.One_Project", {

care:function(){

if(load==true){

alert(hi);

}else

alert(bye);

}

in this example how to call the load variable in controller that is declared globally in view?