I'm using angular and I'm not sure if problem is with it. So I have a checkbox, and when I click on it, it works, but when I need to choose another object and I need to click on it. It appears it (checkbox) has previous state. I need that if I choose another element to click on. It has default state (which is untick (false)).
.ts
show = false
toggleContract() {
this.show = !this.show
}
.html
<p-checkbox (click)='toggleContract()' [ngModel]="show"></p-checkbox>
<ng-container *ngIf="show"><ng-container />
Aucun commentaire:
Enregistrer un commentaire