Enter and leave dialog with ngAnimate