title: Can you use $index outside of ng-repeat?
body: <p>Like so: </p>
  
  <pre><code>&lt;div class="item" ng-repeat="priority in priorities" ng-class="{active: {{$index}} == {{routeParams.priorityId - 1}} }"&gt;&lt;/div&gt;
  
  &lt;a class="carousel-control left" ng-hide="!goals.length" href="#myCarousel" ng-click="changePriorityIdParam($index)" data-slide="prev"&gt;&amp;lsaquo;&lt;/a&gt;
  
  app.controller("PriorityDetailController", function ($http, $scope, $location, $routeParams) {
      console.log("PriorityDetailController - priorityId: " + $routeParams.priorityId);
      getPriorityForPriorityId($http, $scope, $routeParams);
  
      $scope.changePriorityIdParam = function(index) {
          console.log("changePriorityIdParam() - index: " + index);
          $location.path('/priority/' + index);
          $location.replace();
      };
  })
  </code></pre>