Skip to content

Commit

Permalink
Merge pull request #32 from ctjhoa-linagora/master
Browse files Browse the repository at this point in the history
Fix validationSubmit directive
Huei Tan committed Jul 18, 2014
2 parents 5f06982 + a96c499 commit 3f9ff21
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/angular-validation.js
Original file line number Diff line number Diff line change
@@ -572,11 +572,13 @@

return {
priority: 1, // execute before ng-click (0)
terminal: true,
require: '?ngClick',
link: function postLink(scope, element, attrs) {
var form = $parse(attrs.validationSubmit)(scope);

$timeout(function () {
// Disable ng-click event propagation
element.off('click');
element.on('click', function (e) {
e.preventDefault();

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: 3 additions & 1 deletion src/directive.js
Original file line number Diff line number Diff line change
@@ -293,11 +293,13 @@

return {
priority: 1, // execute before ng-click (0)
terminal: true,
require: '?ngClick',
link: function postLink(scope, element, attrs) {
var form = $parse(attrs.validationSubmit)(scope);

$timeout(function () {
// Disable ng-click event propagation
element.off('click');
element.on('click', function (e) {
e.preventDefault();

0 comments on commit 3f9ff21

Please sign in to comment.