My style of writing angular controllers is like this (using controller name instead of function)
angular.module(\'mymodule\', [
])
.controller(\'myContro
@TruongSinh answer worked for me and is way nicer than having additional functions in the router. I tweaked it a little as it was returning the deferred object instead of the actual resolved data.
$routeProvider.when('/someroute', {
templateUrl: 'partials/someroute.html',
controller: 'SomeController',
resolve: {
myModel: 'myModel'
}
});