Programmatically set height (or rows) of <ion-textArea>


I’m trying without success to set the height of an <ion-textarea> accordingly with the height of the screen that i’m getting with sucess with platform.height() .

I tried with :

  • Binding the rows attribute :

<ion-textarea [rows]="myRows" ></ion-textarea>

Gives a blank page.

  • And using css :

<ion-textarea [style.height]="myHeight" ></ion-textarea>

Change the height of the wrapper but not the DOM element <textarea>, so it doesn’t work either.

Do you have any ideas ?

Thanks !



Thanks I use [attr.rows]=“myRows”. it’s worked fine with me

thank you very much, saved me a lot of time.

Got to be kidding me!!! so many other far more complex solutions to this that i found and tried. Thx a million!