AngularJS : ng-repeat how -to conditionally format display items
Posted on 2015-01-06
I'm using JSON binding to the following - a fact contains a name so fact.name = 'ABC', fact.name ='XYZ'
<ion-item ng-repeat="fact in facts" item="fact" >
if fact contains ABC I want to show the item like this.
use ABC class and show it in BOLD
if fact contains XYZ I want to show the itme like this.
use XYZ class and show in RED
and so on
How do I conditionally show / format etc an item based on the value?