I'm trying to fade in/out a div on click of a link using ngAnimate and css3 transitions. I have the following, but it isn't working. The div is shown/hidden, but does not fade in or out. Where did I go wrong:
.fade-in-out.ng-add {
transition: 1s linear all;
opacity: 0;
}
.fade-in-out.ng-add-active {
opacity: 1;
}
.fade-in-out.ng-remove {
transition: 1s linear all;
opacity: 1;
}
.fade-in-out.ng-remove-active {
opacity: 0;
}
The div is initially hidden (showMe=false). On the page is a link which sets showMe to true.
<div ng-show="showMe" class="fade-in-out">
<div style="float: right; cursor: pointer;" ng-click="showMe=false">x</div>
blablabla
</div>
Note that I'm using angular 1.2.26.