admin管理员组

文章数量:1391969

What is the difference between $window.location.reload() and $route.reload() in Angular.js?

I have used these two things, but both are working same progress.

Can anyone explain the differences?

What is the difference between $window.location.reload() and $route.reload() in Angular.js?

I have used these two things, but both are working same progress.

Can anyone explain the differences?

Share Improve this question asked Apr 1, 2015 at 7:02 user4201923user4201923 1
  • 1 @Ramesh Rajendran this is your duplicate account ?I am not sure :-P.But it seems to be :-P – squiroid Commented Apr 1, 2015 at 7:03
Add a ment  | 

1 Answer 1

Reset to default 7

$window.location.reload() - It uses to reload the page

$route.reload() - Causes $route service to reload the current route even if $location hasn't changed.

As a result of that, ngView creates new scope and reinstantiates the controller.

本文标签: javascriptDifference between windowlocationreload() and routereload() in angularjsStack Overflow