this is my checkbox in the template
<label class="checkbox-inline" *ngFor="let option of options">
<input
type="checkbox"
name="{{ option.name }}"
(change)="onChangeOptions($event)"
/>{{ option.value }}
</label>
In TS file
days: any = [
{
id: 1,
name: "repeat_1",
isActive: true,
value: "1"
},
{
id: 2,
name: "repeat_2",
isActive: false,
value: "2"
},
{
id: 3,
name: "repeat_3",
isActive: false,
value: "3"
}
];
public onChangeOptions(event): void {
const a = event.target.checked;
console.log("display val",a);
}
i am just getting false or true value which changes with every checkbox, it acts as common checkbox, i want true false vals in an array, so that i can assign them to my global variables repeat_1, repeat_2 repeat_3 accordingly