Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
120
rated 0 times [  122] [ 2]  / answers: 1 / hits: 10370  / 10 Years ago, mon, june 2, 2014, 12:00:00

I'm trying to reload page using $route.reload():



var App = angular.module(App, [ngRoute]);  
var idx = 0;

App.controller(List, function ($scope, $route) {
$scope.changeWallet = function (index) {
idx = index;
$route.reload();
console.log(success);
};
}


success is shown in console, but nothing happens.

How can I fix this?


More From » angularjs

 Answers
1

If you want to reload the complete page instead of route refresh inject the $window service and call location.refresh



$window.location.reload();


[#44886] Saturday, May 31, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
byrondonavanc

Total Points: 675
Total Questions: 107
Total Answers: 105

Location: Peru
Member since Fri, Oct 14, 2022
2 Years ago
;