While working with my Hybrid Mobile Application with Ionic framework, often I need to clear navigation history and redirect users to Login page. Also needs to make sure, On login and logout I need to reload the page, in order to refresh the data, however, $state.go(‘homePage’) takes the user back to the view without reloading - the controller behind it is not called.

The routing in Ionic is powered by ui-router AngularJS module.


There are couple of ways to solve this problem.

This will just reload the state

$state.go($state.current, {}, {reload: true});

This will actually reload the page


Using any of those solution will fix your problem.