javascript - AngularJS ui view autoscroll not working -
i'm using angular's ui-router having problem when click on new view, page doesn't start @ top was. set autoscroll true in ui-view others suggested still isn't working. i'm not sure reason not working.
<ui-view autoscroll="true" />
the default option true, maybe there's preventing autoscroll firing, need more code. can make custom code that'll work. this
$scope.$on('$routechangesuccess', function () { window.scrollto(0, 0); });
Comments
Post a Comment