title: Angularjs resolve with controller as string
body: <p>My style of writing angular controllers is like this (using controller name instead of function)</p>
  
  <pre><code>angular.module('mymodule', [
  ])
      .controller('myController', [
          '$scope',
          function($scope) {
              // Some code here
  
          }
      ]);
  </code></pre>
  
  <p>What I need now is when providing i routes I want to define resolve part: </p>
  
  <pre><code> $routeProvider.when('/someroute', {
          templateUrl: 'partials/someroute.html', 
          resolve: myController.resolve}) // THIS IS THE CRITICAL LINE
  </code></pre>
  
  <p>Since controller is defined as a name how to accomplish resolve part bellow?</p>
  
  <p>To clarify more in details I want to load some data from server before route is resolved and then use these data in controller.</p>
  
  <p><strong>UPDATE:</strong> To be more precise I want each module has its "resolve" function that will be called before root with that controller is executed. Solution in <a href="https://stackoverflow.com/questions/11972026/delaying-angularjs-route-change-until-model-loaded-to-prevent-flicker">this post</a> (answered by Misko Hevery) does exactly what I want but I don't have controllers as functions but as a names.</p>