Hi I am new to angular and I am using primeNg components in which I have a form and in my form I have a <p-inputswitch> tag and I have my JSON data coming from the backend and each record has
{...
"status": "ACTIVE"
....},
either the status is active or inactive. I want this inputSwitch to be in ON position if the status is Active else keep it in Off Position. This is what my input switch looks like
Also to mention - I have many no: of records which have status active or inactive.
This is my input formcontrolName
<div class="col-12">
<p-inputSwitch onLabel="Active" offLabel="Inactive" formControlName="status" ></p-inputSwitch>
</div>