Use one function for 2 properties in Angular
<p>I have 2 different properties : </p>

<pre><code>$scope.totalPendingDisplayed = 15;
$scope.totalResolvedDisplayed = 15;
</code></pre>

<p>Each of this properties is binded to different containers with <code>ng-repeat</code> (this properties is used for <code>limitTo</code> )</p>

<p>When I click on button "Load More" (<code>ng-click="loadMore(totalResolvedDisplayed)"</code>) I want to execute function <code>loadMore</code></p>

<pre><code>$scope.loadMore = function(totalDisplayed) {
            totalDisplayed += 15;
        };
</code></pre>

<p>But this function doesn't change input field, which is one of <code>totalPendingDisplayed  or totalResolvedDisplayed</code>.</p>

<p>I don't want to write 2 similar function for each property. How can I solve this?</p>