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.

$animateProvider.classNameFilter causes ng-hide animation to play on element load #15426

@mike-bresnahan

Description

@mike-bresnahan

Upon upgrading from AngularJS 1.3 to 1.5, I think I have encountered a bug in ngAnimate.

When:

  1. $animateProvider.classNameFilter is used to filter the elements that are to be animated,
  2. the element has a ng-show that is set to false initially

Upon load of the element, the ng-hide animation is played.

In 1.3 the ng-hide animation did not play and if I remove the call to $animateProvider.classNameFilter the animation does not play, so I do not expect the animation to play in the case above. Instead I expect the element to be hidden upon load.

A plnkr is here:

https://plnkr.co/edit/PwmgrB8X8SRHpOpNYnFb

Click on "Toggle Container Visibility" and observe that a sliding animation is played. Next, comment out $animateProvider.classNameFilter(/animate-/); in script.js and observe that the animation does not play.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions