user2331095
user2331095

Reputation: 6707

AngularJS - Can't reload page when clicking the same URL?

I am using AngularJS to build my web app.

<nav>
    <a href="/news">news</a>
    <a href="/sport">sport</a>
</nav>

When my location is /news, then I click news, it will not reload the page.

Is there anything I could do to fix it ?

thx!

Upvotes: 0

Views: 860

Answers (1)

Prateek
Prateek

Reputation: 6965

To force angular to re-render the current page, you can use:

$route.reload();

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

Upvotes: 1

Related Questions