Belal Othman Belal Othman - 10 months ago 37
AngularJS Question

angularjs: I need reset form without showing required fields with red color

when save my form (user)
after that I need to reset it to save new user
If I reset just like that
user = {};
and try to save new user
all the mandatory fields are appear with red color

how can I reset my form to avoid the red color


you can reset it like below:

$scope.resetForm =  function() {
    $scope.user= {};

call this function from your save function success...