Clear a form after submitting


I’m trying to clear a form after submitting it. I’ve looked around and I’m trying with $setPristine in this way:


< form name=“form.NewEvent” >…< /form >

JS (Controller):

$scope.form = {};

$scope.button = function(event){
Events.saveEvent(event, $scope.imgURI).then(function(){
console.log(‘el $setPristine: ‘, $scope.form.NewEvent.$pristine);
}, function(err) {
console.log(’ Error…’, err);

It looks like it works ($pristine logs as true) but when I get back to the form it still has the same content I submitted

Can anyone help me, please?

Refer Modal : Clear Form + Validation