Search Posts

Category: mean-stack

Fire event when route changes to the same route angularjs

I want to perform a reload of a route when it changes to the same route, in other words reload a controller when a button that takes to its route is clicked. In my view in the ng-click directive I call the following method: this.reload = function() { $scope.$on(‘$routeChangeStart’, function(event, next, current) { if($route.current == $ { $route.reload(); } }) } But the code inside the condition is never triggered, I’m a beginner in angularJS, […]