user6202450
user6202450

Reputation:

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

Upvotes: 1

Views: 1359

Answers (1)

Blai Samitier
Blai Samitier

Reputation: 179

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

Upvotes: 0

Related Questions