Refresh ion-list when it loads

I have a sign in page and a shopping list page. If I successfully sign in, I will go to shopping list page. The problem I have is the shopping list page still have the previous signed in user shopping list.

For example: User A sign in, shopping list page shows user A shopping list. User A sign out. User B Sign in, shopping list page still shows user A shopping list until user B “pull to refresh”.

I want to auto-refresh the shopping list page once if I go there. I use something similar to ionic refresher ( )

<ion-content ng-controller="MyController">
    pulling-text="Pull to refresh..."
  <ion-list ng-init="doRefresh()">
    <ion-item ng-repeat="item in items"></ion-item>

How do I call doRefresh() when I transit from sign in to shopping list ? I have ng-init=“doRefresh()” inside , but it does not work.

Search the forum about view caching.

There are several solutions which may depend on how you defined your state and controller.