How To Reload The Current State In Ionic 1.x App

Posted by Weston Ganger on December 17, 2015

Using $state.reload() in Ionic doesn’t really reload the state as you will find.

Here is a better method to reload the state and not cache the $scope using UI-Router’s go function

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

Or You can also do this via attributes for a link in html

<a ui-sref="profile" ui-sref-opts="{reload: true, inherit: false}">

<!-- OR with params -->

<a ui-sref="profile({id:})" ui-sref-opts="{reload: true, inherit: false}">

Related External Links:

Posted in Ionic and Tagged with ionic ui-router 

Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts