title: Angular 1.5 Unknown provider
body: <p>So i get the: </p>
  
  <blockquote>
    <p>Error: $injector:unpr<br>
    Unknown Provider 
    Unknown provider: canOrganiseProvider &lt;-</p>
  </blockquote>
  
  <p>i cannot figure out why, i simple have this end point which i've tested it works ok, and just want to resolve this before i navigate to a route, it does not work when trying to resolve canOrganise, any ideas why?</p>
  
  <p>Thank you.</p>
  
  <p>Jumping into code.</p>
  
  <p>The end point.</p>
  
  <pre><code>  [HttpGet]
          [Route("{eventCode}/isOrganiser")]
          [Audit(AuditLog.Nothing)]
          public IHttpActionResult HasOrganisationalRights([FromUri] string eventCode)
          {
              var response = Resolve&lt;ICanManageEventOrganisationRightsOperation&gt;().CanOrganiseEvent(new CanManageEventOrganisationRequest
              {
                  EventCode = eventCode,
                  CurrentUser = CurrentUser,
              });
  
              return CreateResponse(response, () =&gt; response.CanOrganise );
          }
  </code></pre>
  
  <p>Angular routing:</p>
  
  <pre><code>angular.module('Events').config(['$routeProvider',
      function ($routeProvider) {
          $routeProvider
      .when('/event/:event/attendees', {
                          templateUrl: '/Content/AngularApp/Attendees/List/Template.html',
                          controller: 'AttendeesController',
                          resolve: {
                              'data': ['$route', 'AttendeesService', function ($route, AttendeesService) {
                                  return AttendeesService.getAttendees($route.current.params.event).then(function (response) {
                                      return response.data;
                                  });
                              }],
                              'canManage': ['$route', 'AttendeesService', function ($route, AttendeesService) {
                                  return AttendeesService.canManage($route.current.params.event).then(function (response) {
                                      return response;
                                  });
                              }],
                              'canOrganise': ['$route', 'AttendeesService', function ($route, AttendeesService) {
                                  return AttendeesService.isOrganiser($route.current.params.event).then(function (response) {
                                      return response;
                                  });
                              }],
                              'grouped': ['$route', 'AttendeesService', function ($route, AttendeesService) {
                                  return false;
                              }]
                          }
                      })
  }
  ]);
  </code></pre>
  
  <p>Angular service</p>
  
  <pre><code>    angular.module('Events').factory('AttendeesService', ['$http', 
      function ($http) {
              return {
  
                  getAttendee: function (eventCode, accountName) {
                      return $http.get('api/events/' + eventCode + '/attendees/' + accountName + '/');
                  },
  
                  isOrganiser: function (eventCode) {
                      return $http.get('api/events/' + eventCode + '/isOrganiser');
                  },
      }
  </code></pre>
  
  <p>Angular controller</p>
  
  <pre><code>    angular.module('Events').controller('AttendeesController', ['$scope', '$rootScope', '$routeParams', '$location', '$filter', 'data', 'canManage', 'canOrganise',
          'grouped', 'AttendeesService', 'AttendeeAdderService', 'AttendeeDeleterService', 'TrackingService', 'WatcherAdderService', 'WatcherDeleterService',
          'GroupColorChangerService', 'DefaultSortingChangerService', 'AdminService',
          function ($scope, $rootScope, $routeParams, $location, $filter, data, canManage, canOrganise, grouped, AttendeesService, AttendeeAdderService, AttendeeDeleterService,
                  TrackingService, WatcherAdderService, WatcherDeleterService, GroupColorChangerService, DefaultSortingChangerService, AdminService) {
  
  ...
  
    $scope.isOrganiser = canOrganise;
  
  ...
      }
  ]);
  </code></pre>
  
  <p>angular.module('Events', [
      'ngRoute', 'ngSanitize',
      'angularModalService', 'ngTagsInput'
  ]);</p>