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.

Animation not working with 1.4.x and ui-router: ng-hide-add and ng-hide-remove classes are not generated #12583

Closed
@ndaian

Description

@ndaian

My issue seems similar with #12267, I left a comment there but since that issue is closed, people might not read it.
@matsko worked on that issue.

ng-hide-add and ng-hide-remove classes are not generated. I am not using Material.

Debugging ngAnimate I noticed that all animations are skipped because:

  • function 'areAnimationsAllowed' always returns false because:
    • rootElementDetected is always false because:
      • $rootElement var points to the element before the actual root element:

The element $rootElement points to is a comment and it is inserted by the ui-view directive which is present on the angular root element.
"ui-view" is a directive belonging to https://github.com/angular-ui/ui-router.

When ngAnimate is initialized $rootElement receives the correct value but probably when ui-router inserts its comment right before the angular root element, $rootElement is not updated. So when the animation happens, $rootElement points to instead of

Because 'areAnimationsAllowed' function does not find the angular root element, it retursn false and all animations are skipped.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions