"Pull Refresh is displayed at the very first time


#1

The feature works, but the “Pull Refresh” string is displayed at the very beginning, and then disappears properly after the first use:


#2

Sounds like you’re not wrapping you list items in an ion-list.

    <ion-content>
      <ion-refresher on-refresh="doRefresh()"
                     pulling-text="Pull to refresh..."
                     refreshing-text="Refreshing!"
                     refreshing-icon="ion-loading-c">

      </ion-refresher>
      <ion-list>
        <ion-item ng-repeat="item in items">{{item}}</ion-item>
      </ion-list>
    </ion-content>

#3

@mhartington,

I think @priand is trying to use cards rather than list items. I once had tried to add a pull to refresh to a line of cards, but got the same results.

Is there a correct way to do this?


#4

Still, you should wrap it with an ion-list or div.list.


#5

Thanks, adding an ion-list & ion-item got it to work.

Now, prior to this, I was repeating a ‘div’ containing another ‘div’ with the class “list card”, based on the doc here: http://ionicframework.com/docs/components/#item-avatars. Not obvious to know what should be repeated, or when to better use a directive.


#6

Also one question: now that I added an ion-list, I’m getting a separator between the items. What is the best way to get rid of it?


#7

Not sure I follow, can you provide a codepen?