I am trying to set an attribute on a component if a certain expression is true. Could someone give me an example?
What I have now:
<div [danger]="inArray(choice.likers, user, id)"></div>
but this does not compile.
inArray is my own method which returns true or false. What I would like to see is, if the expression returns true, the output will be
<div danger></div>
In angular 1 there was this: ng-attr-... statement that did exactly the above.