JSFiddle - React, Tailwind, and code Playground
by Pradeep Shankar
HTML
<div id="app" ng-app="myApp" ng-controller="myCtrl">
<input type="number" ng-model="ftest" />
<ul>
<li ng-repeat="x in test | filter : filterMe ">{{x.val}}</li>
</ul>
</div>
JavaScript
angular.module('myApp', []).controller('myCtrl', function($scope, $filter) {
$scope.test = [{
id: -1,
val: "a"
}, {
id: 1,
val: "b"
}, {
id: 2,
val: "c"
}, {
id: 10,
val: "d"
}];
$scope.filterMe = function(x) {
return x.id !== $scope.ftest;
};
});