6

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?

||||||
  • 1
    @Ramesh Rajendran this is your duplicate account ?I am not sure :-P.But it seems to be :-P – squiroid Apr 1 '15 at 7:03
5

$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.

||||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy