-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs for autoscroll #720
Comments
Yeah, I'm confused as to why autoscroll is on by default. I can't think of a use case where I'd like it on.
The autoscroll attribute is an expression, so you could link it to a scope variable to dynamically change the behaviour for that view. |
It's on by default to maintain BC. We were considering resetting it though. |
What backwards compatibility? I'm a little confused on this one as well. In angular the autoscroll ng-view is disabled by default. In ui-router it was never enabled before, so for me, this makes it not bc cause i'm going through and updating all of my code to autoscroll=false. I have already done this, so no real issue for me. Was also just curious, . .. ui-router rocks!! |
Pretty sure that's not accurate. In previous versions, |
I think there is confusion, at least I was confused, as to what $anchorscroll did/does and how 2.8 is different. $anchorScroll() was called by default previously, but that just scrolls based on the hash. So those of us that did not have any anchors in our app did not even notice $anchorscroll. However, in 2.8 the view is automatically scrolled into view and $anchorScroll() is NOT called by default. So by specifying autoscroll=false, we are actually turning $anshorScroll back ON and stopping ui-router from just scrolling to the current view. Using "false" does not actually do anything, you could have autoscroll="bob" and you would get the same effect. Am I wrong? |
@randallmeeker $anchorScroll is for anchors, autoscroll/$uiViewScroll is for views, makes sense. So I agree that having it default to OFF is the correct behavior. Of course, you'll still have to do |
I'll open a new issue for setting the default behavior |
See #715
The text was updated successfully, but these errors were encountered: