I am trying to use the change output of an md-radio-buttons as follows:
<md-radio-group [(ngModel)]="selected">
<md-radio-button *ngFor="let a of array" [value]="a"
(change)="radioChange()">
{{a}}
</md-radio-button>
</md-radio-group>
TS:
selected: string;
filter: any;
radioChange() {
this.filter['property'] = selected;
console.log(this.filter);
}
This always seems to be one step behind the radio buttons. i.e. when changing selection from radio A to radio B, it will console.log the value of radio A.
Any help would be much appreciated.
Cheers,
P