Issue
Hello i want to show a textarea when i press a button on the same page.
html
<button ion-button [NgStyle]="type=='text'">
<ion-item *ngIf="type=='text'">
<ion-textarea>....</ion-texarea>
</ion-item>
.ts
type:string='';
component(){}
What am i doing wrong?
Solution
You can do something like:
inside HTML:
<ion-button color="primary" (click)="showHidetextArea()"></ion-button
<ion-item *ngIf="show">
<ion-textarea></ion-texarea>
</ion-item>
inside .ts
show: boolean = false; // declear variable
showHidetextArea(){
this.show = !this.show;
}
Answered By - Najam Us Saqib
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.