From Angular\'s documentation it follows that ngSubmit is a preferred way of submitting a form. All pending operations are immediately finished and $submitted f
$submitted
app.directive("form", function(){ return { require: 'form', restrict: 'E', link: function(scope, elem, attrs, form) { form.doSubmit = function() { form.$setSubmitted(); return scope.$eval(attrs.ngSubmit); }; } }; });
Html:
Then call in controller
$scope.myForm.doSubmit();