Here is a simple view that i want to instantiate :
Ext.define('myapp.view.Home',{
extend 'Ext.Panel',
xtype : 'testpanel' ,
config: {
title:'home',
iconCls:'home',
cls : 'home',
html: [
'<h1> Hello Guys </h1>',
'<p> some text goes here </p>'
].join("")
}
});
i have added the view to my controller as follows :
Ext.define('myapp.controller.Main', {
extend : 'Ext.app.Controller',
views : ['Home'],
...
}
i have used the xtype in my application as follows:
items:[{
xtype : 'testpanel'
},
Still I get this error :
Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.testpanel
I appreciate your help.
I think you forgot to add this view in app.js - Ext.Application's "views" array. Do check.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With