Trying to set the the button innterText with an IF statement:, see image, but it’s not happy. have tried many different ways of representing…
Have tried with single quotes around the value too:
blogPost.status == ‘Draft’ ? ‘mode_edit’ : ‘published_with_changes’ but I don’t get the material icon (i.e. I get the text ‘published_with_changes’ in the button itself
?
The expression in your text with single quotes should work. The issue is that your component is using the Icon component from the HTML library (“i” tag) vs the icon component from the Angular Material library.
Sorry for the confusion on that. I have added an item to the backlog to rename the one in the base library to “Italic” to avoid confusion.
Yep, that did it, thanks!