PDA

View Full Version : How to store array in Config.js



jaami
22 Aug 2013, 7:18 PM
is it possible to save array in Config.js? What are ways to have application wide access to an array without defining it as global variable?

fmoseley
26 Aug 2013, 6:47 PM
What Config.js file are you referring? I would not recommend editing framework src files.

jaami
27 Aug 2013, 12:55 AM
The Config.js in app/util/Config.js

Here is the code




Ext.define('POPA.util.Config', {
singleton : true,
config : {
loginUrl : 'http://bunkai.com/Service.svc/verifyUser/',
CWbase: '',
Email: '',
Name: '',
NextDuty: '',
PH1: '',
PH2: '',
Pno: '',
Position: '',
Qualification: ''
},

constructor : function(config) {
this.initConfig(config);

this.callParent([config]);
}
});