ui-router: Scroll to top (0,0) on each state/route change?

3,347 views
Skip to first unread message

Frenky Harry

unread,
May 12, 2014, 1:56:15 AM5/12/14
to ang...@googlegroups.com
Hello, I have menu with ui-sref on the footer to load content above it (center). I use ui-router but I have a problem, whenever the state/route change the view is still on the footer instead of the top (0,0). How to achieve this? I have read these but no luck:
The problem with #2 is I cannot get it to work

The current autoscroll option in ui-vew is fine for me but i need the view to scroll a slightly over the top of the loaded view instead of exactly on top of it.

Thanks.

Frenky Harry

unread,
May 12, 2014, 12:50:07 PM5/12/14
to ang...@googlegroups.com
I found solution, just add $uiViewScrollProvider.useAnchorScroll(); in app config and enable autoscroll on each ui-view (<ui-view autoscroll="true">)
Reply all
Reply to author
Forward
0 new messages