I'm trying to display an element conditionally. This code that I applied to the element should work:
<a [style.display]="chatIsToggled ? 'display: block' : 'display: none'">
link
</a>
The problem is that Angular doesn't apply the style because of "unsafe style value"
WARNING: sanitizing unsafe style value display: none (see http://g.co/ng/security#xss).
What would be an equivalent way to achieve what I want to do?