HTML Code:
<ion-checkbox color="dark" checked="false" id="1on" (ionChange)="onTap($event)" ></ion-checkbox>
TypeScript Code:
onTap(e)
{
console.log(e);
console.log(e.checked);
}
I am trying to retrieve the id of the checkbox. How can I achieve this?
When inspecting the event, I can see ElementRef inside it, which contains nativeElement, inside there is an id. How do I access and print this id using console.log without utilizing Ajax in the TypeScript file?