Possible Duplicate:
emberjs: how to trigger a custom event in a View
I've created a jsfiddle to demonstrate the issue. WHen you click in the view (on the text) you will see in the console that the view receives the click. But when I create a custom event and trigger it, its not received in the router:
App.IndexView = Em.View.extend({
click: function(e) {
console.log("CLICK");
this.get("controller").send("doStuff");
}
});
App.IndexRoute = Em.Route.extend({
....
doStuff: function(e) {
alert("Do stuff") ;
}
});
Here is a complete working example too http://jsfiddle.net/jeanluca/9Xasr/6/
Any suggestions ?
Cheers