Is there an easy way to do this? I assume just use the $ionicScrollDelegate but can I register that to call every time the menu opens?
Yup, totally posible…
.controller('MainCtrl', function($scope, $ionicSideMenuDelegate, $timeout, $ionicScrollDelegate) {
$timeout(function () {
$scope.$watch(function () {
return $ionicSideMenuDelegate.getOpenRatio();
},
function(ratio){
if (ratio == 0 ){
$ionicScrollDelegate.$getByHandle('my-handle').scrollTop();
}
else{}
});
});
})
1 Like
Thank you for sharing this. Saved a lot of time…