If you include the autoscroll attribute in the ng-include directive as follows, auto-scroll does not work:
<div ng-include="temp" autoscroll></div>
autoscroll="
The same goes for
If you look at the document, it says that the autoscroll attribute is set to scroll to the location of the loaded part.
If anyone knows, please let me know.
angularjs
It seems to say that the autoscroll attribute is set to scroll to the location of the loaded part.
The autoscroll attribute is not a feature that autoscrolls ng-include to a specified element, but
Set whether to use the $anchorScroll scrolling feature
This $anchorScroll looks for an element with an ID that matches the value of $location.hash() and
If present, it scrolls to the location of the element.
http://jsfiddle.net/xsdauxn7/
I made a sample above, so please refer to it
© 2024 OneMinuteCode. All rights reserved.