angularjs - how can I reload my angular page without using location.reload()? -
there seem 2 answers question:
$scope.cancel = -> location.reload()
or:
$scope.cancel = -> $route.reload()
the first works fine full , seems doing lot more work needed. second doesn't seem work @ -- can see hitting reload method , queuing updateroute
function this.$$asyncqueue.push(expr)
reload doesn't happen. can force $route.reload
work? there better way accomplish this?
have tried $location.path(..) ? angular $location service
# code handles funky url gets generated , keeps # funk minimum # moment js library dealing time # typical url looks like: # http://192.168.101.111:3001/#/admin/user/edit/m6e8wanliaf%231376602267119 # moment tag after %23 , angular seems deal fine $scope.cancel = -> if (/#/.test($location.$$path)) $location.path($location.$$path.replace(/#.*/, "##{moment()}")) else $location.path($location.$$path += "#" + moment());
Comments
Post a Comment