parent
460ccf2dfd
commit
09f252a7e1
1 changed files with 4 additions and 1 deletions
|
@ -1045,6 +1045,8 @@ angular.module("core-config-setup", ['angularFileUpload'])
|
|||
'isOptional': '=isOptional'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
var firstSet = true;
|
||||
|
||||
$scope.getRegexp = function(pattern) {
|
||||
if (!pattern) {
|
||||
pattern = '.*';
|
||||
|
@ -1053,8 +1055,9 @@ angular.module("core-config-setup", ['angularFileUpload'])
|
|||
};
|
||||
|
||||
$scope.$watch('binding', function(binding) {
|
||||
if (!binding && $scope.defaultValue) {
|
||||
if (firstSet && !binding && $scope.defaultValue) {
|
||||
$scope.binding = $scope.defaultValue;
|
||||
firstSet = false;
|
||||
}
|
||||
|
||||
$scope.errorMessage = $scope.validator({'value': binding || ''});
|
||||
|
|
Reference in a new issue