1

I can't get animations to work for ng-show only.

This works to fade out and fade in:

        .animate-show {
            display: block !important;
            -webkit-transition:all linear 1.5s;
            transition:all linear 1.5s;
        }

        .animate-show.ng-hide {
            opacity:0;
        }

    <div ng-show="match.userId" style="margin-right: auto; margin-left: auto;" class="padding animate-show ng-hide">
      ...
    </div>

I want to fade IN only.... no animation on hide. This doesn't work

       .animate-show {
            display: block !important;
        }

        .animate-show.ng-hide-remove.ng-hide-remove-active {
            -webkit-transition:all linear 1.5s;
            transition:all linear 1.5s;
        }

        .animate-show.ng-hide {
            opacity:0;
        }

Here's a plunkr:

http://plnkr.co/edit/9KNqt5TAZ8Ejy8eeJUQs
1
  • can you post a plunkr? Commented Sep 16, 2014 at 16:02

1 Answer 1

1
.animate-show.ng-hide-remove.ng-hide-remove-active {

ng-hide-remove-active is too late, you only need ng-hide-remove.

Working plunker

Sign up to request clarification or add additional context in comments.

4 Comments

No impact, see plunkr.
Your example only works for Angular 1.3.0RC. I'm using Ionic framework which seems to only support 1.2.4.
@Jeff There were some bugs that have been fixed with 1.2.17. You could always switch to JavaScript based animations though.
in my case, it seems ng-hide-remove-active makes the whole animation to stop working, I removed it as you advised, and it started working. However, this: ng-hide-remove-active was from angular docs so I'm not sure why would this still work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.