Subhajit Subhajit - 1 year ago 105
AngularJS Question

AngularJS $state.go with full page refresh

Seems like $state.go('statename') works like a back button in the browser. A cached Type.

I need to refresh the page when state changes like clicking the refresh button in the browser.

I need to reload/refresh the full page when the state changes, basically re-initializing the controller.

Tried with $state.go('statename', {}, {reload: true}), but with no effect.

Help would be appreciated

Answer Source

If you don't mind injecting $window, you can try with $window.location.reload()

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download