I noticed this on two of my projects where I'm using AngularJS, so I'm assuming it's an issue with AngularJS.
Let's say I have a button on the menu that says "Register" and takes me to /account/register page. But, if I'm on the /account/register page, clicking the button won't refresh the page. It's like the button is disabled. This is always happening when the link I want to click has the same URL as the current page I'm on. The URLs are simple <a href="something1/something2">Link</a>
. How can I remove this behavior?
Had the same problem with angular, adding target="_parent"
attribute to the link made it work.
For who didn't understand, I have recorded my screen to display this issue. Basically, there are somethings wrong of Angular.
I fixed it by adding target="_parent"
or target="_self"
attribute to the anchor tag as answered above.
Check more on Angular docs
You can check if the current url/state/hash is "/account/register" ... if yes then use reload method of the $route service.
AngularJs: Reload page
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With