ng-change is not getting fired after selection of previously selected option.
Because of which I am not able to handle the same next selection.
<select ng-model="selectedOption" ng-change="handleSelection()">
<option value="A" selected>A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
I want to show to the user the last selected option and want to handle the same.
But since ng-model is not changing on next same option selection ng-change is not getting fired.
How to handle this scenario?
You can do without
ng-changeby only checking click count:1st
click eventraises after each openingselect2nd
click eventraises after one item selectedwe use
blur eventto clear click count after lost focusby this way you will get selected item without
change eventandwithout selecting new item:--