I have a problem when I using toggle animations and dynamic content for a list.
Scenario:
step 1
I have a list with information within (like an accordion, but is not. I’ve got ‘sections’ and ‘articles’ ).
Item1
item2
item 3
item 4
step 2
When I click in one of them the information is shown
Item1
item2
item 3
Information (very large height)
item 4
step 3
When I click in another item a toggle with animation (300ms) begin closing the last item opened and opening the new one with its info.
Item1
New Item Clicked with information
item2
item 3
item 4
Problem?
The content height change from its original size all the time but the Resize() function is not triggered in any case until i click in any part of the screen. (that force the resize() method to be triggered)
If I add a ionicScrollDelegate.Resize() with a $timeout of 300ms (animation’s duration) it work (sometimes) but it’s not a viable solution.
I ended up adding a line in ionic.js and trigger resize() when “isScrolling == false” because when the large content of my items are hidden with the animation a little bit of scrolling is made.
This is the only way I came up with to resolve this problem but I don’t like the option of forking the ionic.js. (Im working with RC4)
Any ideas for a better solution??