test for new angular directive: match password inputs

This commit is contained in:
Gustavo Maximiliano Cortez 2014-07-18 18:17:45 -03:00
commit b17bc2310d
2 changed files with 38 additions and 5 deletions

View file

@ -244,11 +244,11 @@ angular.module('copayApp.directives')
match: '='
},
link: function(scope, elem, attrs, ctrl) {
scope.$watch(function() {
return (ctrl.$pristine && angular.isUndefined(ctrl.$modelValue)) || scope.match === ctrl.$modelValue;
}, function(currentValue) {
ctrl.$setValidity('match', currentValue);
});
scope.$watch(function() {
return (ctrl.$pristine && angular.isUndefined(ctrl.$modelValue)) || scope.match === ctrl.$modelValue;
}, function(currentValue) {
ctrl.$setValidity('match', currentValue);
});
}
};
})