Jacksonkr
Jacksonkr

Reputation: 32207

angular js template logic to remove repeater item

I have a repeater that looks like

<ion-item ng-repeat="obj in data">
  {{obj.value}}
</ion-item>

which displays an item list of the numbers 1 through 10. When an odd number shows up I want that particular item to be hidden. Is this something I can do within the view it's self? Regardless what's a good way to do this?

Upvotes: 0

Views: 98

Answers (1)

Mohamed Nizar
Mohamed Nizar

Reputation: 777

You have to control your data set in your controller:

$scope.ProId = "";    
$scope.HideOdd = function (){
        -- create a function to hide DATA
}

and on your ion tag ad ng-hide="HideOdd"

Upvotes: 1

Related Questions