Angular 7 - Not Triggering "valueChanges" From The Template (using Mat-option)
I have a form control. In my template I am changing it using mat-option, but I want that this specific change will not trigger valueChanges (I have other changes that I want that '
Solution 1:
Your mat-option must be wrapped inside of mat-select as below
<mat-select>
<mat-option *ngFor="let food of foods" [value]="food.value">
{{food.viewValue}}
</mat-option>
</mat-select>
Checkout the documentation of angular material. It has pretty good examples with code snippets
Heres the link: https://material.angular.io/components/select/overview
Post a Comment for "Angular 7 - Not Triggering "valueChanges" From The Template (using Mat-option)"