Say I have a big title, so the ng-view directive is not listed on the page. before this ng-view, I have a kind of menu that starts angular routing and therefore changes the view. My problem is that at any time when the routing starts, the page keeps scrolling up so that the partial part is not in the viewport.
here is my routing:
angular.module('portfolio', []) .config(function ($routeProvider, $anchorScrollProvider) { $anchorScrollProvider.disableAutoScrolling(); $routeProvider .when('', { templateUrl: 'portfolio/index.html', controller: 'PortfolioListCtrl' }) .when('/portfolio/:project', { templateUrl: 'portfolio/detail.html', controller: 'PortfolioDetailCtrl' }) .otherwise({redirectTo: ''}); });
I have $anchorScrollProvider.disableAutoScrolling(); , this does not work.
Anyone have an idea?
Thomas
source share