Hey there! I'm currently working on an application using the MEAN stack with AngularJS for the front-end. Can anyone provide me with a solution on how to reload the page when clicking the submit button?
I've tried the following code snippet to achieve this:
Within the Controller:
sryarnpayment.$save(function(response) {
$location.path('sryarnpayments/' + response._id, {}, { reload: true });
$scope.name = '';
}, function(errorResponse) {
$scope.error = errorResponse.data.message;
});
};
In the HTML file:
<div class="controls">
<input type="submit" class="btn btn-default">
</div>