angularjs class ternary operator code example Example: ternary operator in angular {{selectedSport.key === 'walking' ? 'steps' : 'km'}}