192
rated 0 times
[
193]
[
1]
/ answers: 1 / hits: 35141
/ 8 Years ago, fri, december 23, 2016, 12:00:00
Is there a way to debounce the template directive (ngModelChange)
?
Or, alternatively, what is the least-painful way to do it a different way?
The closest answer I see is this: How to watch for form changes in Angular 2?
So, for example, I have a text input, I want to get onChange updates, but I want to debounce it down from every keystroke:
<input type=text class=form-control placeholder=Enter a value name=foo [(ngModel)]=input.event.value (ngModelChange)=onFieldChange($event, input)>
Debounce onFieldChange()
More From » angular