-1

When I redirect to a page, I want it to refresh automatically only once per load. I want to accomplish this using angularjs. Can someone please help.

Vadiem Janssens
  • 4,069
  • 1
  • 17
  • 27
Susanna
  • 33
  • 10
  • It's better if you use "ui-router", and then you will have "states" which you can "reload()" them. [ui-router](https://ui-router.github.io/ng1/) – Maher May 24 '17 at 04:40
  • `window.location.reload();` use this where necessary,that will reload your page – Hema May 24 '17 at 04:54
  • Thanks Hema, but this refreshes the page multiple times whereas if you have read my question I have asked to refresh just once.. – Susanna May 24 '17 at 06:16
  • I was able to find my solution at this url: https://stackoverflow.com/questions/6985507/one-time-page-refresh-after-first-page-load Javascript worked for me – Susanna May 24 '17 at 17:13

1 Answers1

0

Please, never look for refreshing the page while using angular Js. But if you still want to do this, then you can do this by the native JavaScript function. Write this code inside the redirected to controller .

Windows.reload();

Thanks..

Shubhranshu
  • 511
  • 3
  • 12