When I click on checkbox, I want to show my backend parameter to split as two text-boxes. I am facing difficulty, Can anyone help here.? this is coming from backend. like values as labels
template_parameter: "namespace,resources"
I need to split above parameter into two text boxes on click checkbox. like namespace as label and textbox, resource as label and textbox
Please help, Thank you. Html:
<div class="form-check" *ngFor="let product of DisplayProductList">
<label class="form-check-label text-break">
<input class="form-check-input" type="checkbox" formControlName="templateparameter" [value]="true"
[(ngModel)]="product.isChecked" (change)="changeSelection($event)">
<span class="form-check-sign">
<span class="check"></span>
</span>
</label>
</div>
ts:
changeSelection(event: any) {
if (event.target.checked) {
this.selectedItemsList = this.DisplayProductList.filter((product, index) => {
if (product.isChecked == true) {
return product.isChecked
}
}
);
}
Aucun commentaire:
Enregistrer un commentaire