Custom Accordion Problem

Since Ionic doesn’t provide an accordion component, I rolled my own extremely crude implementation of it, using a flag with ng-click and ng-if. The problem is that it seems the window doesn’t respond to the increased content height after the accordion is expanded so I can’t scroll down beyond the initial page height. But only after some seconds will the window resize vertically and all is good again.

Can someone please enlighten me with a better way to do accordions?

Here’s a plunker to demonstrate. Seems like I can’t even scroll here.

Just in case anyone is having the same problem, this solved it.

$scope.$broadcast('scroll.resize');