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