javascript - AngularJS – $route.reload() not working -


i'm trying 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" shown in console, nothing happens.
how can fix this?

if want reload complete page instead of route refresh inject $window service , call location.refresh

$window.location.reload();


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -