Reputation: 2383
I'm pretty new to Ember and would like to get a selected models value in child controller/template.
I have a sidebar that lists Workspaces. Whenever someone click on workspace the application routes to workspaces/:slug
and shows a list of tasks connected to that specific workspace.
I would like to show the selected workspace name
in the child route. How would I go about doing that?
My router looks like so:
App.Router.map(function() {
this.route('login');
this.resource('workspaces', function() {
this.route('tasks', {path: ':slug'});
});
});
Been reading a lot of stuff online but haven't quite figured it out.
Thanks.
Upvotes: 2
Views: 69