Is there a way of clearing the history that Angular JS stores when a particular view is loaded through the routeProvider?
I am creating a public installation using angular and the history is going to build up a lot so I want to clear it when the home page is loaded.
in your Controller inject $scope and $location.
$scope.$on('$viewContentLoaded', function(){
  //view loaded do some stuff.
    $location.replace(); //clear last history route
});
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With