.directive('ng-blur', function() {
return {
restrict: 'A',
link: function postLink(scope, element, attrs) {
element.bind('blur', function () {
scope.$apply(attrs.ngBlur);
});
}
};
});
<input type="text" ng-blur="handleInputBlur()"></input>
$scope.handleInputBlur = function(){
// do some action here
}