I found solution, just add $uiViewScrollProvider.useAnchorScroll(); in app config and enable autoscroll on each ui-view (<ui-view autoscroll="true">) source: https://github.com/angular-ui/ui-router/releases/tag/0.2.8
On Monday, May 12, 2014 12:56:15 PM UTC+7, Frenky Harry wrote: > > 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: > > 1. > > http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-view > 2. > > http://stackoverflow.com/questions/22290570/angular-ui-router-scroll-to-top-not-to-ui-view<http://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F22290570%2Fangular-ui-router-scroll-to-top-not-to-ui-view&sa=D&sntz=1&usg=AFQjCNEPC92QkZ2uG3qItYMNzwNGB64Adw> > > The problem with #1 is the option is limited to autoscroll to loaded view > or not > 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. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
