Skip to Content
0
Former Member
Jun 30, 2016 at 05:43 PM

how to set global variable in ui5 controller

705 Views

I am learning ui5 via webide and have to assign a global variable that can be used in any controller. I tried assigning a new variable

'var testglobalvariable=null;' in the controller as below, but ide throws an error everytime. How to assign ?

var testglobalvariable=null;
sap.ui.define([
  "sap/ui/core/mvc/Controller"
], function(Controller) {
  "use strict";


  return Controller.extend("testapp.controller.View1", {


  });
});