I'm currently designing a table to display data from the Premier League. I'm attempting to utilize ng-if
to determine if the home team emerged victorious, and if so, include a cell stating "Home team won"
HTML
<div ng-if="data.full_time_result: === 'H'">
<td>Home Team Won!</td>
</div>
However, the issue is that the "Home Team Won!" message is being added to every row, even when the full_time_result isn't 'H'.
You can check out the example on plnkr.
Additionally, do you have any recommendations on how to achieve this functionality more efficiently? It doesn't seem ideal to have numerous ng-if
blocks in place for each scenario.