Angular: 1.3 ng-model-options
http://angularjs.org/
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.8/angular.js"></script>
<input type="text" name="author" class="form-control" ng-model="author" ng-model-options="{ updateOn: 'blur' }" ng-change="a =author"/>
{{author}}
<input type="text" name="title" class="form-control" ng-model="title" ng-model-options="{ debounce: 1000 }"/>
{{title}}
JavaScript
var myApp = angular.module('myApp', []);
//transclude example
myApp.directive("myWidget", function () {
return {
restrict: "E",
transclude: true,
template: "<div ng-transclude><h3>Heading</h3></div>"
};
});
myApp.directive("myWidget2", function () {
return {
restrict: "E",
template: "<div><h3>Another heading</h3></div>"
};
})