I am using angular reactive forms, the change method for select field is not fired when I select already selected option. Here is the link https://stackblitz.com/edit/angular-2e1cvz in this example if I select option 1, event fired but if I select again 1 event is not fired.
Asked
Active
Viewed 1,007 times
1
-
You cannot use `ngModel` with reactive forms. – Balaj Khan Oct 19 '20 at 09:01
-
any other event that could I used. – Hasnat Hameed Oct 19 '20 at 09:07
-
you can use change event if there is no two way binding `(change)="onChange($event.target.value)"` – Balaj Khan Oct 19 '20 at 09:41
-
Does this answer your question? [How can I get new selection in "select" in Angular 2?](https://stackoverflow.com/questions/33700266/how-can-i-get-new-selection-in-select-in-angular-2) – Balaj Khan Oct 19 '20 at 09:42
-
actually I want to trigger change event on select for already selected option. in short on every option's click event should be triggered, even for already selected option. – Hasnat Hameed Oct 19 '20 at 09:53
1 Answers
0
As the name of the event says it will only trigger when it detects a change in value, if u select the same value again means that is not change in value thats why select field hadn't triggered change event.

Ilaiyanila
- 1
- 1
-
any other method that you know to capture select value, on option click. – Hasnat Hameed Oct 19 '20 at 09:55