Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to clear textarea after a button is triggered?

$
0
0

@mabelll wrote:

Hi, I’m working on having the textbox area to be clear after the send button is triggered.
I’ve been trying but is not working.
May I know how can I achieve this?

  <ion-content>
    <ion-list>
      <ion-item *ngFor="let answer of answersList" text-wrap>
      {{answer}}
      </ion-item>
    </ion-list>
</ion-content>

<ion-footer>
  <ion-toolbar position="bottom">
    <ion-row style="align-items: stretch">
      <ion-col width-90>
        <input ion-textarea type="text" id = "inputText" [(ngModel)]="question" placeholder="Type a message..">
      </ion-col>

      <ion-col>
        <button ion-button round (click)="ask()">Send</button>
      </ion-col>
    </ion-row>
  </ion-toolbar>

  <!--<div *ngFor="let answer of answers">
    {{answer}}
  </div>
  -->
</ion-footer>

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>