I have been reading posts online regarding if else
logic using angular. I was able to achieve the desired result but I am wondering if there is a another way / better way to do if else in angular.
The code below prints Flower available date if the flower name is not Tulip. And prints SomeOther date if flower name is Tulip.
<td *ngIf ="data.FlowerName !=='Tulip'" id="someId" class="flower-detail bold">Flower Available Date: {{data.AvailableDate | date:'shortDate'}}</td>
<td *ngIf ="data.FlowerName ==='Tulip'" id="someOtherId" class="flower-detail bold">SomeOther Date: {{data.NextDate | date:'shortDate'}}</td>
<td id="some-action" class="flower-detail">
<button id="actionTricolon" class="action-tricolon"> </button>
</td>
Is there a way to write it in a better way?