I'm using Angular 6 and Bootstrap 4. I have this Bootstrap button group:
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary">
<input type="radio" [(ngModel)]="usecase" name="options" id="option1" [value]="customer"> Kundenzuordnung
</label>
<label class="btn btn-secondary">
<input type="radio" [(ngModel)]="usecase" name="options" id="option2" [value]="stock"> Lagerware
</label>
<label class="btn btn-secondary">
<input type="radio" [(ngModel)]="usecase" name="options" id="option3" [value]="internalUse"> Interne Verwendung
</label>
</div>
I want a function to be called when a button is selected and I have tried all of the following methods/properties below:
(click)onclickonkeydownng-change(ngModelChange)- left out value field
How can I call my function formChange(0) when the user selects a button?
(ngModelChange)="myFunction($event)"should work.