2

am newbie to ionic. I try to add dynamic data to the top of my list, in this scenario ionic scroll doesn't work properly, other thing is newly added item ll not visible by default, to view new item , we need to scroll to up.I think we need to re-initiate ionic scrolling after new item added but i cant find out how to do. Any one have this trouble or found any solution for this problem. share with me in this post.

Is there any config settings available to re-initiate scroll after event occurs?

1
  • can you post the code of the ion-view which is having this issue? Commented Mar 5, 2015 at 8:12

1 Answer 1

2

I don't fully understand your question, but if want to reinitialise scroll after dynamic data addition , you can use a work around like I do.

In your event, after data is added to your DOM. Call this.

$ionicScrollDelegate.scrollTo(0,$ionicScrollDelegate.getScrollPosition().top,true);
Sign up to request clarification or add additional context in comments.

2 Comments

It works perfectly! If you are facing problems on scrolling for ionic projects when there are dynamic content, use this solution when the UI changes! Nice @Karan Kumar
PS: The problem only occurs on Android 5.0-

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.