I need some working codepen on $ionicScrollDelegate.anchorScroll(true);
I need to jump to particular id in ng-repeat so please suggest how can i do it.
I tried this but it is not working :
Thanks @mhartington for the codepen i tried to use your code in my collection repeat where i have assigned id to my list item, when i try to scroll to particular id using
$ionicScrollDelegate.$getByHandle('myscroll').anchorScroll("#"+id); but it remains on the top can’t figure it it what the issue is.
But when i try to use $ionicScrollDelegate.$getByHandle(‘myScroll’).scrollTo(0,800,false); then it scroll to that particular position.
Please let me know what the issue is and it could be better if you could provide the working codepen showing anchorScroll in list
Thanks for you concern
It could be a conflicting delegate handle issue. I had that when putting together this demo.
i am able to find the issue in the below link anchorscroll works perfectly
as suggested by you
I have edited the above codepen and found that if we place our content in ng-repeat under div
tag then anchorscroll works fine but if i change it to ion-item tag then it won’t work as shown in the below codepen
Hmm, it may have something to do with when ion-item gets compiled…
I’ll bring this up the devs and see whats going on
Can confirm that this is fixed in the nightlies
can this be done in ionic2?