I have seen various examples of how to use "resolve" to load data before activating a controller (e.g. https://github.com/angular-ui/ui-router/wiki), but I cannot understand how to incorporate this into the MeanJS architecture.
Here is a popular question/answer: Delaying AngularJS route change until model loaded to prevent flicker
I am unsure if the "resolve" option should be added in mymodule.client.routes.js and/or how to structure/inject the pre-loaded service into the controller arguments.
Any advice on how to transform the example to fit with MeanJS?
Using angular version 1.2.26
-- Update --
I tried removing data-ng-controller="MyController" from the view and instead setting the controller directly in the mymodule.client.routes.js alongside the "resolve" option. That seems to fix injecting the resolved object into the controller, but changes the MeanJS architecture. Is this the right/only approach?