I need that when clicking on the text activate the checkbox or deactivate it that is to say that the text acts as the same checkbox
how can I do it this project is in Angular 8
andng prime
<div class="form-check">
<p-checkbox name="defaultCheck1" id="defaultCheck1" class="form-check-label" for="defaultCheck1" formControlName="PlantaBeneficio" binary="true" (click)="validarAccesos();"> Planta de Beneficio </p-checkbox>
<label class="form-check-label" for="defaultCheck1">
<b>Planta de Beneficio</b>
</label>
</div>
Try adding the attributes to the control like this.
In
label="
you add thelabel
one you need like thislabel="Planta de Beneficio"
, your control would look like this: