Dynamic directive for ion-buttons


#1

I’d like the “left” directive to be dynamic, based on a RTL variable I maintain. Is that possible without writing my own directive?


<ion-buttons left class="row">
...
</ion-buttons>

#2
<ion-buttons [attr.left]="isRtl ? '' : null" class="row">
...
</ion-buttons>

#3

Worked!
Toda Avishai


#4

Welcome :slight_smile:


#5

[attr.left] doesn’t work for me, but without ‘attr’ works:

<button ion-button [outline]="!selected">
    All
</button>