Is It Possible To Conditionally Display Element Attributes Using Angular2?
I have some code that uses Polymer attributes on elements, for example: The way polymer works is that I can't simply say force-narrow='false
Solution 1:
Simple attribute binding does what you want:
[attr.force-narrow]="someField ? true : null"
the attribute is not removed when someField
is false
, only when it's null
Post a Comment for "Is It Possible To Conditionally Display Element Attributes Using Angular2?"