What is the proper way to call a route from the controller or view. For instance I have a table with many rows. Every row View has a click method that should call the router. It doesn't work I am having trouble navigating the app from the controller or view.
Here is an example: http://jsfiddle.net/arenoir/Cs938/
App.TableView = Ember.CollectionView.extend({
tagName: 'table',
contentBinding: 'controller.rows',
itemViewClass: Ember.View.extend({
tagName: 'tr',
template: Ember.Handlebars.compile("<td>{{view.content.name}}"),
click: function(){
var router, tab;
router = this.get('controller.target.router');
tab = this.get('content.id');
router.goTab(tab);
}
})
});
The following post is helpful. EmberJS: How to transition to a router from a controller's action.