Alexey Yarkov2016-03-16 13:22:42
Alexey Yarkov, 2016-03-16 13:22:42

Angular animate and callback. How?

Example link: https://passwordkeeper-yarkovaleksei.c9users.io/bu...
Try deleting an element with the button in the right column. See? The animation hasn't finished yet, and the element has been removed. How to do the opposite? I do animation like this:

/*global angular*/

(function() {
  'use strict';

    .animation('.slide-item', [function() {
      return {
        enter: function(element, doneFn) {
          jQuery(element).fadeIn(1000, doneFn);
        move: function(element, doneFn) {
          jQuery(element).fadeIn(1000, doneFn);
        leave: function(element, doneFn) {
          jQuery(element).fadeOut(1000, doneFn);


Answer the question

In order to leave comments, you need to log in

1 answer(s)
_ _, 2016-03-16

The animation works correctly, the problem is track by $index in your template. Here, read

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question