My AngularJS app has a reset link that I need to use to reset it...
<a ng-click="resetApp()">reset</a>
The button press is being handled in the main controller...
$scope.resetApp = function(){
if(confirm("You will lose data...")){
$scope.user.reset();
// I am unsure if using window.location in this way is the best practice
window.location = "/#";
}
}
I am uncertain if my approach of setting window.location
is the correct way to handle this. It works for me, but I have not been able to find a more AngularJS-specific solution online.