Skip to content

Commit

Permalink
Merge pull request #12 from zack9433/master
Browse files Browse the repository at this point in the history
Fix callback reference issue
  • Loading branch information
Huei Tan committed May 13, 2014
2 parents 6ff77c8 + 964c577 commit e3710c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/angular-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,10 @@
expressionType = $validationProvider.getExpression(validation).constructor,
valid = {
success: function () {
return validFunc(element, attrs[successMessage], validation, scope.validCallback(), ctrl);
return validFunc(element, attrs[successMessage], validation, scope.validCallback, ctrl);
},
error: function () {
return invalidFunc(element, attrs[errorMessage], validation, scope.invalidCallback(), ctrl);
return invalidFunc(element, attrs[errorMessage], validation, scope.invalidCallback, ctrl);
}
};

Expand Down Expand Up @@ -525,4 +525,4 @@
}
};
}]);
}).call(this);
}).call(this);
2 changes: 1 addition & 1 deletion dist/angular-validation.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
expressionType = $validationProvider.getExpression(validation).constructor,
valid = {
success: function () {
return validFunc(element, attrs[successMessage], validation, scope.validCallback(), ctrl);
return validFunc(element, attrs[successMessage], validation, scope.validCallback, ctrl);
},
error: function () {
return invalidFunc(element, attrs[errorMessage], validation, scope.invalidCallback(), ctrl);
return invalidFunc(element, attrs[errorMessage], validation, scope.invalidCallback, ctrl);
}
};

Expand Down

0 comments on commit e3710c8

Please sign in to comment.