angular-vs-repeat icon indicating copy to clipboard operation
angular-vs-repeat copied to clipboard

Scroll To / Anchor scroll

Open mila212 opened this issue 8 years ago • 4 comments

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

mila212 avatar Apr 19 '16 11:04 mila212

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 avatar Apr 24 '16 04:04 varvarvar

@varvarvar Where would you put that code statement?

Shaggy13spe avatar Oct 26 '16 11:10 Shaggy13spe

@Shaggy13spe , I would put it there in code where I can calculate position which I wanted to set a scroll bar at.

varvarvar avatar Oct 26 '16 19:10 varvarvar

See https://github.com/kamilkp/angular-vs-repeat/issues/144

mdarveau avatar Dec 14 '16 01:12 mdarveau