How to reload an external controller in angularjs ?
From a template, I want change and reload it :
$location.path("/pageToReload");
I guess you want to reload the current page.
You can use the reload method of either the $route or the $window service. Inject the service in your controller and then create a method reloadPage on your $scope :
$scope.reloadPage = function() {
$route.reload();
}
Or with $window :
$scope.reloadPage = function() {
$window.location.reload();
}
You can then call those methods from your template with, for instance, this directive :
ng-click="reloadPage()"