angularjs - new angular router - autoscroll equivalent -


ui-router , 1.4 angular router supported autoscroll="true" enable page scroll top of page on navigation route. know how new angular router?

ng-outlet not appear have autoscroll property , router not appear have events can listen can hook manually.

a manual way of doing is:

$rootscope.$on('$locationchangesuccess', function() {   document.body.scrolltop = document.documentelement.scrolltop = 0; }); 

Comments