JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="app" ng-controller='ctrl'>
<div ng-repeat=" item in num"> 
    <div ng-if="display(item)" >  
        display this
    </div>
</div>
</div>

JavaScript

angular.module('app', [])
.controller('ctrl', function($scope) {
    $scope.num = [1,2,3];
    $scope.display = function(x) {
        if (x === 2) {
            return true;
        } else {
            return false;
        }
    };
});