Ionic

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: user.id})" ui-sref-opts="{reload: true, inherit: false}">


Related External Links:


Posted in Ionic and Tagged with ionic ui-router 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts