I am new in ionic and have a problem with textarea. This is my code:
<textarea [(ngModel)]="userData.aboutme" name="" id="" cols="30" rows="20"
value="{{ about_me}}" style="width:100%; padding: 10px; margin-top: 3px;" >
</textarea>
The problem is that the value is not showing inside textarea. It's show only if i remove the [(ngModel)]
.
I need help for this thanks a lot
You need to use ion-textarea
.
Note: This is just an example.Adjust it as you wish.
Working stackblitz
html
<ion-item>
<ion-textarea placeholder="Tap here"
[(ngModel)]="note" name="note" autocomplete="on" autocorrect="on"></ion-textarea>
</ion-item>
.ts
note: string = "My Default Text";
constructor(public navCtrl: NavController) {
}
Offical doc about ion-textarea
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With