dubdiff/client/components/mongoose-error/mongoose-error.directive.js

17 lines
403 B
JavaScript

'use strict';
/**
* Removes server error when user updates input
*/
angular.module('markdownFormatWdiffApp')
.directive('mongooseError', function () {
return {
restrict: 'A',
require: 'ngModel',
link: function(scope, element, attrs, ngModel) {
element.on('keydown', function() {
return ngModel.$setValidity('mongoose', true);
});
}
};
});