Reputation: 891
I want to do a wipe-in animation for my ng-show. Basically, I want to achieve this simple animation as shown in plunkr here.
I know that ngShow has a hook for ng-animate since angular 1.3. However, the situation is a bit complicated. I have a carousel that I extend using angular UI Carousel bootstrap. The bootstrap has a bug with Chrome, so ngAnimate needs to be disabled for all elements under the carousel
tag. I need animation for element under my carousel, but if I include ngAnimate, my carousel won't work in Chrome -- as described in their github issue tracker here
As a workaround, I am thinking to do the animation using traditional CSS bootstrap to my ng-show inside my carousel. I did some research but I have no luck so far. Is this possible? And does anybody try this before? Thanks so much!
Upvotes: 1
Views: 2345
Reputation: 903
You can use the ng-class
directive instead of ng-show
and ng-hide
which will conditionally add class to the element that should wipe-in, invoking the desired transition, giving basically the same effect and omitting entirely the ngAnimate
module.
Here's a plunker showing the implementation.
Upvotes: 4