Skip to main content

Posts

Showing posts with the label Debounce

Debounce in AngularJs with Examples

What is Debounce In generally debounce is nothing but to wait for sometime and do this action. With debounce, you can add a delay for updating the ngModel value.  Eg: if a user wants to update the model value after 2 sec (or) update the model value after some action then by just adding this debounce will do the job. ng-model and ng-model-options To use this debounce we need to know about ng-model and ng-model-options, so let us just briefly know about it. Data binding is one of the best feature of Angular Js. ng-model is the best option is to bind the data to the view. ng-model directive provides a two-way data-binding mechanism that makes the connection between your View-Model and various User Interface (UI) controls. So, ng-model knows how to bind your View-Model to something like an input[type=text]; and, conversely, it knows how to update the Input value when your View-Model changes. To have a good control on how the angular updates and manipulates the data AngularJs...