PDA

View Full Version : [OPEN]Ext.Router not working



sg707
7 Mar 2011, 10:21 AM
I tried the following

in my html file, I simply added this link



<a href="#contactsController">test</a>


then I registered the controller and used the Router to map the URL


Ext.regController('contacts', {
list : function() {
console.log('called list');
}
});

Ext.Router.draw(function(map) {
console.log(map);
map.connect('contactsController', {
controller : 'contacts',
action : 'list'
});
});


When I click the link "test". It does not execute my controller.