Side menu scrolling issue when content is added dynamically


#1

In my side menu, I have a list that is shown / expands when a button is clicked. The user should then be able to scroll down the side menu to see all of this list, but the new side menu height isn’t taken into account, so it doesn’t allow scrolling. It seems that if you try to scroll upward, the downward scrolling will start working… I only figured that out by tinkering for a good bit of time. I forked this side menu demo to include the problem: http://codepen.io/anon/pen/jPOXOG


#2

You need to tell the scroll to resize, something like this:

HTML

<button ng-click="clicked()" class="buttton button-block">Click me!</button>

JS

.controller("CartController", function($scope, $ionicScrollDelegate) {
  
  $scope.clicked = function() {
    $scope.shouldShow = true;
    $ionicScrollDelegate.resize();
  }

  ...
})

#3

That solved it! Thanks!