Is there a way to call a function with specific parameters when the value of a select element changes in Angular?
<div class="col-sm-6 col-md-4">
<label class="mobileNumberLabel " for="mobilrNumber">Select Service</label>
<div class="nice-wrap">
<select (change)="checkCategory(item.price,item.serviceName,m,k,'add');" class="js-example-basic-single nice-textbox" >
<optgroup *ngFor="let item of serviceObject;let k = index" label='{{item.categoryName}}'>
<option *ngFor="let service of item.services;let m = index">
{{service.serviceName}} - {{item.categoryName}}
</option>
</optgroup>
</select>
</div>
</div>
I need to pass the price and serviceName of the selected option as parameters to the checkCategory function. Can this be achieved in Angular?