Use ng-blur directive.