Is there a callback available for when a side menu is closed?
I’m using a multi-level navigation in a side bar and would like to return to the top level when closed.
I’m using the following at the moment and calling it on selection of a sub-nav element.
function moveToRootWhenClosed() {
if (!$ionicSideMenuDelegate.isOpenLeft()) {
setToRoot();
} else {
$timeout(moveToRootWhenClosed, 500);
}
}
but I hate using timers like this. Is there an event?