ternary operator in angular label code example Example: ternary operator in angular <span> {{selectedSport.key === 'walking' ? 'steps' : 'km'}} </span>