Quantcast
Viewing all articles
Browse latest Browse all 4826

Is there a clean way to set up nested routes without rendering parent routes and still being able to set values on the controller?

@Hummingbird wrote:

I know that I can use nested routes which don't render the parent routes, if I don't use templates/myRoute.hbs , but templates/myRoute/index.hbs. However, this leads to another issue:

If in routes/index.hbs I use the setupController method, to set a value on the controller, I end up with the controller for controllers/myRoute.js instead of controllers/myRoute/index.js (which I would actually need). So, I could work around that by manually retrieving the right controller, or using a different way to set up the controller, but both seem rather cumbersome.

I tried to setup all the routes, controllers and templates to use the */myRoute/index.js|hbs pattern, however this just leads to the params in the route:model(params) function being undefined...

Is there a clean way to render a template without rendering the parent nested templates and still being able to access that controller from setupController() in the route?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles