show text based on ternary operator in html template angular 8 code example
Example: ternary operator in angular
<span> {{selectedSport.key === 'walking' ? 'steps' : 'km'}} </span>
<span> {{selectedSport.key === 'walking' ? 'steps' : 'km'}} </span>