Chapter 9: Controlling model inputs with ngModelOptions

HTML

<script src="https://code.angularjs.org/1.3.2/angular.min.js"></script>
<div ng-app="myApp">
    <form name="playerForm">
        Name:
        <input type="text"
               name="playerName"
               ng-model="player.name"
               ng-model-options="{  debounce: {'blur': 500, 'click': 300, 'mousemove': 0} }" />
    </form>
    <!-- will only update on the events listed for updateOn -->
    {{ player.name }}
</div>

JavaScript

angular.module('myApp', []);