angular-vs-repeat
angular-vs-repeat copied to clipboard
Scroll To / Anchor scroll
Hi, First of all, great project, thank you!
If I want to add anchorScroll or scrollTo functionality to the vs-repeat structure, what will be the best way to do it? What do you recommend?
Thank you
I think I found way: if you know approx position in pixels, then
$timer(() => { containerElement.animate({ scrollTop: pos }, 0); })
will do the trick. Make sure that there is no latch option set to true in vs-options.
@varvarvar Where would you put that code statement?
@Shaggy13spe , I would put it there in code where I can calculate position which I wanted to set a scroll bar at.
See https://github.com/kamilkp/angular-vs-repeat/issues/144