code: function(scope, $element, attrs, ctrl, $transclude) {
        var previousElement, previousScope;
        scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {
          if (previousElement) {
            $animate.leave(previousElement);
          }
          if (previousScope) {
            previousScope.$destroy();
            previousScope = null;
          }
          if (value || value === 0) {
            previousScope = scope.$new();
            $transclude(previousScope, function(element) {
              previousElement = element;
              $animate.enter(element, null, $element);
            });
          }
        });
      }
docs: we use 600 here to ensure that the directive is caught before others