Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ngmodel change

<select [ngModel]="selectedItem" (ngModelChange)="onChange($event)">
onChange(newValue) {
    console.log(newValue);
    this.selectedItem = newValue;  // don't forget to update the model here
    // ... do other stuff here ...
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ngmodel #change
ADD COMMENT
Topic
Name
6+2 =