I'm using the angular along with ngAnimate . With ngAnimate you can add some css classes in the element that applies ng-hide
or ng-show
to apply an animation of transition.
I need to execute a callback
at the end of an animation ng-show
or ng-hide
. These animations are done through classes that I set in css
.
Example:
<div ng-show="loading" class="animate">Carregando</div>
<div ng-hide="loading" class="animate">Isso aqui só pode mostrar quando a div acima for oculta</div>
That is, when the variable loading
is false
, I need the #loading
div to be removed and #content
is displayed, but only after #loading
is hidden.
The problem I am having is that the two are active at the same time. I mean, while one is hiding, the other one already appears. This causes the screen to jump down below and then become normal.
Is there any way to execute a callback
after the end of an animation made with ng-show
or ng-hide
?
Example on JSFIDDLE