I'm currently working on my first custom filter, and while the basic principle is functioning (it displays all the CDs of an artist from 7 and up), I'm encountering an issue where the filter doesn't update when I change the value. It consistently remains at "7". Here's what I have so far:
HTML INPUT
<input type="number" value="7" id="numberOfCdsByArtist">
CONTROLLER:
$scope.filterCDs = function (Artist) {
var numberOfCdsByArtist = $('#numberOfCdsByArtist')[0].value;
return Artist.numberOfCDs >= numberOfCdsByArtist ;
}
NG-REPEAT:
<div class="Artists" ng-repeat="Artist in Artists | orderBy:'Name' | filter:filterCDs">
<div>{{Artist.Name}}{{Artist.numberOfCDs}}
</div>