I want to pass arguments self-defined to a view when creating it at the app level, but it doesn’t work. I have read the class system in sencha documentation, and relevent problems in Stack Overflow, but that hasn’t helped to resolve my issue.
Ext.define('ImgPanel', {
extend: 'Ext.Panel',
config: {
flex: 5,
appName: '', // self-defined
},
var imgPanel = Ext.create('ImgPanel', {appName: 'city'}); alert(imgPanel.getAppName()); // does not show the 'city' that I'm expected
For the
className, use a string dot-namespaced format. Instead of,Change the class name to include the application’s (
Ext.application) name,Check out this working example.