I have different dialog boxes in a page. if i open dialog box and do some form submit if the form is not a valid then it will show error messages and the dialog is closing. again if I reopen the same dialog errors are showing. i want to hide error messages when i reopen the same dialog again.
I have done some code changes in dialog close event it's not working.
$dlg = $("#ItemDialog");
close: function () {
var popupForm = $dlg.find("form");
$(popupForm).trigger('reset');
if ($scope.popupForm) $scope.popupForm.$setPristine();
}