In my application i have a material2 select dropdown widget with few options.
app.component.html
<md-select placeholder="Choose an option" [(ngModel)]="myOption"
(optionSelectionChanges)="setOptionValue(myOption)">
<md-option value="value1"> Option-1 </md-option>
...
</md-select>
I'm trying to call 'setOptionValue()'
whenever the option value changes.
./app.component.ts
..
myOption: string;
constructor(..){
this.myOption = 'value1';
}
setOptionValue(option: any) {
console.log(option)
}
There are no official documentation on how to use optionSelectionChanges
property.