0
像這樣:
<div class="item" ng-repeat="priority in priorities" ng-class="{active: {{$index}} == {{routeParams.priorityId - 1}} }"></div>
<a class="carousel-control left" ng-hide="!goals.length" href="#myCarousel" ng-click="changePriorityIdParam($index)" data-slide="prev">‹</a>
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();
};
})
沒有$指標限制只是NG-重複 –
我可以$指數的副本,並得到它的PriorityDetailController不知何故? :/ – Cole