I have a problem with AngularJS ng-change
and ng-blur
therefore I want to confirm with an expert that this is the right way to use them when we update the form value.
- I have a dropdown in the code below, and I want to execute
overrideBusinessDec()
when the user changes the value of the dropdown. With the current implementation, due ng-blur
, this happens when we wring out the form. I can make a quick fix by deleting ng-blur
from the field and it will work as expected. - Another scenario: when you are in the editing state, it fills in the values, but does not include the form if I do not add
ng-blur
to the field. I do not know how to fix this.
Is there a solution that can solve both problems?
<div>
<select kendo-drop-down-list k-data-value-field="'id'"
k-data-text-field="'text'" k-option-label="'Select'"
k-data-source="ctrlEffOptions"
ng-disabled="!processRating.controlEffectivenessRatingComputeKey"
ng-model="processRating.controlEffectivenessRatingOverrideKey"
ng-change="overrideBusinessDec()" id="controlEffBusiness" required ng-model-options="{updateOn: 'blur'}">
</select>
</div>