In this example there is an array named Arrs which contains four elements but show only two element because ng-if directive evaluates expression i.e Arr will not contain element One and Four.It will show element Two and Three.

<!DOCTYPE html> <html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> </head> <body ng-app="initExample"> <div ng-controller="ExampleController as vm"> <div ng-repeat="Arr in Arrs"> <span ng-if="Arr!='One' && Arr!='Four'">{{Arr}}</span> </div> </div> <script> var app = angular.module("initExample", []); app.controller('ExampleController', ['$scope', function ($scope) { $scope.Arrs = ["One", "Two","Three","Four"] }]); </script> </body> </html>