In Sencha touch 2, how can I set the value of a attribute ( like the html one) using a function?
Example:
{
xtype: 'panel',
html: function () {
if (conditionA) return 2
return 4
}
}
Any ideas?
Using a self-executing anonymous function:
{
xtype: 'panel',
html: (function () {
if (0) {
return 'lol';
}
return 'rofl';
})()
}