Get resolve variable and pass to controller
<p>Hi I created a model named billerModel and a route that has a resolve with a variable of billers. Now I want to retrieve and assign this variable inside my controller but I get this billerData unknown provider error. Below are my code for the route:</p>

<pre><code>app.config(["$routeProvider", "$httpProvider",'$locationProvider',function($routeProvider, $httpProvider, $locationProvider) {

$routeProvider
    .when("/billers", {
        templateUrl: 'admin/billers/index.html',
        controller: 'billerController',
        resolve: {
            billerData: function(billerModel) {
                return billerModel.getData();
            }
        }
    });
</code></pre>

<p>Below is my code for the model</p>

<pre><code>app.factory('billerModel', ['$http', '$cookies', function($http, $cookies) {
    return {
      getData: function() {
        return $http({
            method: 'GET',
            url: 'billers'
        });
      }
    }
}]);
</code></pre>

<p>Below is my controller code that gives me the error</p>

<pre><code>app.controller('billerController', ['$scope', 'billerData',  
   function($scope, billerData){
       $scope.billers = billerData;

}]);
</code></pre>

<p>I also tried to remove the ng-controller from my view but if I do this then I get an error of unknown variable</p>

<pre><code>&lt;div style="text-align: left;" ng-controller="billerController"&gt;
    {{ billers }}
&lt;/div&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/jDcUp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jDcUp.png" alt="enter image description here"></a></p>

<p>Below is a jsfiddle but I'm not familiar on how to use it but the basic structure is included here
<a href="https://jsfiddle.net/bd06cctd/1/" rel="nofollow noreferrer">https://jsfiddle.net/bd06cctd/1/</a></p>