I'm fairly new to both javascript and extjs and I encountered this problem while trying to run through the steps of the extjs 4.1 MVC Architecture tutorial. Evereything works fin in the beginning but when I try to add the controller to the application something goes wrong. Neither the applications launch function nor the controllers init function is called. I used the sample code from here here but I couldn't get the 'defining a controller' step working. It finds the Users.js there's no error message, still it won't call the controllers init function. If I remove the 'controllers: ['Users'],' the applications launch will be called. Any ideas what I'm missing?
app.js:
Ext.application({
requires: ['Ext.container.Viewport'],
name: 'Account Manager',
appFolder: 'app',
controllers: ['Users'],
launch: function() {...}
Users.js:
Ext.define('app.controller.Users', {
extend: 'Ext.app.Controller',
init: function() {
console.log('Initialized Users!');
}
});
Thank you for your time.
});
at the end ofapp.js
? Also do you get any errors on your console? – Izhaki