PDA

View Full Version : Application namespace not found.



kapilkaisare
16 Jan 2013, 10:38 AM
Here's some sample code I have written:


Ext.application({
requires: ['Ext.container.Viewport'],
name: 'TestApp',
appFolder: 'app',
controller: [
'TestAppController'
], launch: function() {
console.log(TestApp);
Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: []
});
}
}); When I run this in the browser, I get Reference Error: TestApp is not defined. Given that the guide says that stating the name creates a global namespace with said name, I would have expected my console log to show me my application object. Could someone please let me know what I doing wrong?
Thanks in advance.

droessner
16 Jan 2013, 1:59 PM
Your controller config should be controllers.

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.app.Application-cfg-controllers