我在一个视图中,我想将操作发送到与我所在的视图不同的控制器或路由器。我该怎么做?
App.FormView = Ember.View.extend ({
actions: {
clicked: function() {
context = this.get("context");
App.OtherViewController.send("clicked", context); //this doesn't work
// this.get("controller").send("clicked", context); // this sends to the current controller
}
}
});