Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Define Global Variables in UI5 JS files?

$
0
0

Hi all

How do I define Global variables in the UI5 JS files generated by the eclipse tool? I wanted some variable which can be used across the JS view and the controller file, or atleast within the same JS view file, different methods

 

I added few variable just below the view controller, but it ran into lot of error

 

e.g.

 

sap.ui.jsview( poc.Initial", {
/** Specifies the Controller belonging to this View. 
* In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
* @memberOf poc.Initial// Some Global Variables
var aContent = {};
var aControls = [];
var Matlayout = new c.layout.MatrixLayout({width:"auto"}),
 getControllerName : function() { 
return "poc.Initial";
 },

Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>