Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngAnimate with ngRepeat in directive using templateUrl issue #14124

Closed
@xavadu

Description

@xavadu

Hello,

Sorry but i can't reproduce this error on plunkr yet.

The issue is that ngRepeat animation fail for the first time when is applied on a directive that use a templateUrl, it start to happen in 1.5.0 upgrade, on 1.4.1 it was working fine.

The css animation never get the state of .ng-enter-active and it keep on the .ng-enter state.

some PoC:

.animate-repeat.ng-enter,
.animate-repeat.ng-move {
    transition: 0.5s ease-out all;  
    animation-fill-mode: both;
}

.animate-repeat.ng-enter {
  background-color: red;
  transform: translate3d(0, -5%, 0);
}

.animate-repeat.ng-enter.ng-enter-active {
  background-color: blue;
  transform: none;
}

.animate-repeat.ng-enter-stagger {
  transition-delay: 0.1s;
  animation-delay: 0.1s;
  transition-duration: 0s;
}

<my-directive ng-repeat="colors in sky" class="animate-repeat"><my-directive>

if sky is equal to null, not defined or empty array, etc.. it happen, if sky is previously populate it doesn't happen. On our case sky is populate by an $http request after some user interaction in a form.

The situation is that myDirective keep with background red and never get the background blue. Later a re-submit, it works, because sky had data previously and wasn't null or empty.

The interesting is that it occur only if my-directive use a templateUrl, if the template is inline all works fine.

Is quite complicate to explain, let me know if you need a better description of some part.

It become really annoying when instead a a background color, you are going from opacity 0 to opacity 1. So, the ngRepeat list don't appear.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions