I have 2 distinct variables:
$scope.totalPendingDisplayed = 15;
$scope.totalResolvedDisplayed = 15;
Each of these variables is connected to different elements using ng-repeat
(used for limitTo
)
When the "Load More" button is clicked (
ng-click="loadMore(totalResolvedDisplayed)"
), I want the loadMore
function to be executed
$scope.loadMore = function(totalDisplayed) {
totalDisplayed += 15;
};
However, this function does not update the input field associated with either totalPendingDisplayed
or totalResolvedDisplayed
I wish to avoid creating similar functions for each variable. How can I resolve this issue?