In my application, before expanding a collapsed section, I need to populate the contents. Similarly, after collapsing an expanded section, I'd like to do some cleanup.
It would be great if the uib-collapse supported additional attributes that would be evaluated before and after the collapse animation, e.g. expanding, expanded, collapsing, collapsed. If the "before" attribute (collapsing/expanding) returns a promise, the directive should wait for it to resolve before beginning the collapse/expand animation.
Specifically, I'd like to be able to do something like this:
<div uib-collapse="isOpen" expanding="setupContent()" collapsed="cleanupContent()">
<!-- complex & expensive content goes here -->
</div>
FWIW, I have an implementation and can create a PR if there is general interest in this...