根据AngularJS(1.3.15)的来源,FormController的方法$setPristine()将表单$submitted状态重置为false:
form.$setPristine = function() {
$animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);
form.$dirty = false;
form.$pristine = true;
form.$submitted = false;
forEach(controls, function(control) {
control.$setPristine();
});
};
Run Code Online (Sandbox Code Playgroud)