Nested Routing - issues passing data


#1

Data not getting loaded into the edit route.

When I enter into the “Edit” route of the project. The data does not seem to be passed. As per the log the transition is “projects.project.edit” I tried that option as well and still no good. As per the documentation I understand it should be “project.edit”

What’s wrong in the code?


#2

The context in your project.edit route is the generated ProjectEditController but your project record is bound to the generated ProjectController.

So you need to access the ProjectController from within your project.edit template (and your partial as it inherits the context). To do this you need to create your ProjectEditController and give it access to the ProjectController through the needs property. Then in your template bind to {{controllers.property.name}}

Hope that makes sense