1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-02-15 04:42:05 +00:00
ansible-playable/client/components/mongoose-error/mongoose-error.directive.js

18 lines
375 B
JavaScript
Raw Normal View History

2017-06-07 17:36:44 +00:00
'use strict';
import angular from 'angular';
/**
* Removes server error when user updates input
*/
angular.module('app2App')
.directive('mongooseError', function() {
return {
restrict: 'A',
require: 'ngModel',
link(scope, element, attrs, ngModel) {
element.on('keydown', () => ngModel.$setValidity('mongoose', true));
}
};
});