How can I limit rows showing in an ng-repeat?
<p>I have an ng-repeat that looks like this:</p>

<pre><code> &lt;div ng-repeat="subject in subjects"&gt;
    &lt;div&gt;{{ subject.name }}&lt;/div&gt;
 &lt;/div&gt;
</code></pre>

<p>Is there some way that I can limit the display of rows to rows where subject.id is less than 50 if roleId > 1 and otherwise show all rows?</p>

<p>$scope.roleId = 0 means no filter
$scope.roleId > 0 means filter to show only rows in $scope.subjects where subject.id is less than 50</p>