I am trying to dynamically add margin to an ion-textarea based on a boolean value. What I am trying to achieve is that when textAreaMargin is false remove the default margin and when textAreaMargin is true add the margin back.
I followed the guide on Setting Attributes Dynamically here
Below is my HTML. Any ideas on how to achieve this?
<ion-textarea [attr.no-margin]="!textAreaMargin ? '' : null" autocorrect="on" [(ngModel)]="editorMsg" (keyup.enter)="sendMsg()" (ionFocus)="_focus()" autosize text-wrap (ionInput)="runTimeChange($event)"></ion-textarea>