When I select a checkbox for any section and then click the submit button, I want to display the details of that section in the console. Can someone assist me with this?
**Stackblitz link:** :
https://stackblitz.com/edit/angular-q7y8k1?file=src%2Fapp%2Fapp.component.html
HTML:
<h6 class="col-12 emr_header m-t10">Immune
<input class="pull-right top-4" type="checkbox">
</h6>
<div class="row bg-white m-0 p-t10 brd-blu" id="record_allergy" *ngFor = "let data of immune">
<div class="col-sm-6">
<label class="col-sm-5">Status :</label>
<label class="col-sm-6">{{data.Status}}</label>
</div>
<div class="col-sm-6">
<label class="col-sm-4">WasNotGiven :</label>
<label class="col-sm-7">{{data.WasNotGiven}}</label>
</div>
</div>
Submit button Html:
<div class="col-12 m-t20 m-b20 text-right">
<a class="share" (click)="exportEmr(data)">Export to EMR</a>
<a class="reset">Cancel</a>
</div>
TS:
exportEmr(data) {
console.log(data);
}