I have two separate routes, say:
When I create a branch, I want to offer a list of brokerages in a select box. To do so I need the model from the “MaintenanceBrokerage” route.
If in my MaintenanceBranch controller, I indicate: needs: [“maintenanceBrokerage”] and indicate a binding to “controllers.maintenanceBrokerage”, it works fine if I’ve previously visited that route, but if I haven’t my select dropdown is empty.
I load the data via the ‘model’ hook in the route on each of the routes for brokerage and branch. What is the best way to be able to access this data from my branch controller if there is no certainty that the brokerage route has been visited yet?