In Extjs 6 how to assign a config property directly to a view either through binding or direct assignment?
Ext.define('App.view.main.Main', {
extend: 'Ext.Container',
config: {
btnLabel: 'MyButton'
},
someOtherProperty:'xyz',
items: [{
xtype:'button',
//text:this.someOtherProperty,
//text:this.btnLabel,
//text:this.getBtnLabel(),
//here accessing this throws error, while loading this refers to windows object and not the class...
width:'150px'
}],
});
i can move the property to ViewModel and access it but my question is this, can't we assign the class level property to its child component?