Thought I’d share my blog posthere for anyone else has dealt with the same problem.
I just started a two new Ember apps and I noticed a common pattern emerge. When I nest routes, the parent route has values that need to stay in sync with the current subroute. For instance, I often show a list view, with a detail view and the ability to edit and perform other actions on the detail view. If I have buttons in the parent template whose values and actions should change when the subroute changes, I found my
routeVal computed property to save me from writing a ton of extra code. Old approaches involved transitioning manually via actions that ensured the state of these route-dependent values (but that assumes a certain order of navigation to a degree) or accessing the parent route’s controller inside the subroute’s setupController hooks and setting these values. I much prefer to have the values defined in one spot and on the controller the appropriate controller