I’m using anchorscroll to scroll to an element on the page.
View:
<a ng-click="scrollTo('foo')">Click me!</a>
<SOME CONTENT>
<div id="foo">Here you are.</div>
Controller:
.controller('MyCtrl', function($scope, $location, $anchorScroll) {
$scope.title = 'Ionic';
$scope.scrollTo = function(id) {
$location.hash(id);
console.log($location.hash());
$anchorScroll();
};
})
After clicking the link, the content view seems to get stuck. You can scroll down further than the element, but you can’t scroll up past the element.
I’ve tried reproducing this on vanilla Angular, and it doesn’t seem to occur there. Any way to ‘unstick’ the content after using anchorscroll?
-
Vanilla Angular: http://plnkr.co/edit/PCO051UJS8EHbdkmFV40