I have ng-include which loads content based on a dynamic url (works as expected).
<ng-include class="my-content-area" src="templateUrl"></ng-include>
The problem occurs when I try to animate the enter and leave content (according to the angular docs, these are two events that ng-include provides for the animation).
.my-content-area.ng-enter, .my-content-area.ng-leave { transition: all 500ms; } .my-content-area.ng-enter { opacity:0; } .my-content-area.ng-enter.ng-enter-active { opacity:1; } .my-content-area.ng-leave { opacity:1; } .my-content-area.ng-leave.ng-leave-active { opacity:0; }
enter works as expected, but leave does not. I just see that the content disappears right away (doesn't disappear) when templateUrl changes in my controller.
Any ideas?
Jt703 source share