Subhajit Subhajit - 7 months ago 45
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


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