Closed aarongray closed 9 years ago
It's essentially coupling the correct logic in the correct file. The routing logic isn't "in" the Controller, but becomes a property of:
function SomeCtrl() {
}
SomeCtrl.resolve = {
prop: function (Service) {
return Service.resolve();
}
};
If you've a huge application, then you've got a huge mash of Service calls all over your router, instead of managing them as "components" inside the relevant files. I hope that helps somewhat.
Thanks man. Cool styleguide. ^_^
Here it talks about putting our resolves in the controller, instead of in the router. This is interesting to me, because I thought that you wanted to keep your controllers as slim as possible (as a general rule, and in prep for Angular 2.0). Can you elaborate a little more about why you would want to put your resolve logic inside a controller?
Thanks! ^_^