Within my ngFor loop, I have a toggle button for 'watching' and 'watch' on each feed item:
<button ion-button small icon-left [color]="primary" (click)="toggleNamedColor(feedItem)">
{{feedItem.watchlist}}
</button>
The values for feedItem.watchlist are either false or true.
I am looking for the simplest way to update the global variable 'color' and display text based on the following conditions:
If feedItem.watchlist is false, change color to success and text to 'watching'. If feedItem.watchlist is true, change color to primary and text to 'watch'.
Any help or suggestions would be greatly appreciated. Thank you!