Ion-scroll on-scroll-complete not work


#1

http://play.ionic.io/app/051bf8ee1106
There is should be alert after scroll animation complete.
If change ion-scroll to ion-content all will work


#2

anybody?
may be I did something wrong?


#3

Hi, @to2n

I have reviewed your code. There is one good component available in ionic for scrolling.

<ion-content>
      <ion-list>
        <ion-item ng-repeat="x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]">
          {{x}}
        </ion-item>
      </ion-list>
    <!--</ion-scroll>-->
    <ion-infinite-scroll on-infinite="handler();" distance="5%"></ion-infinite-scroll>
    </ion-content> 

This is the modified code in your example. I have used ion-infinte-scroll directive for fulfilling your requirement.

Hope this will solve your issue.

Feel free to mark it as a solution and you can always like the answer by clicking heart icon.


#4

I got this question too. I need the scroll-complete trigger to do some function call.
Any one knows about this?


#5

I don’t need infinity scroll.
I need to know when scroll animation is completed (even in middle of list or on top).


#6

Hi @to2n,

If your data is so less that there would be no scroll then any of the scroll will not going to help.

Because scroll will only be there if your data exceeded to the screen size. So there is no chance that your scroll complete at middle or at top. It always stops at bottom.

Still if you can show me the exact scenario then I may help you further.


#7

http://play.ionic.io/app/a4381d954d7b

  1. press top button
  2. wait until scroll will stop
  3. there is should be alert dialog

If change ion-scroll to ion-content it will work right http://play.ionic.io/app/03684124d027

I have 3 scroll area on the screen in my app. I think it is not right to use 3 ion-content on one screen. Is not it?

I try to implement simple scenarion - programly scroll left list to item and select it, then scroll middle list and select item


#8

create issue