Carlos Cifuentes
AngularJS library migration · animations

Migrating ngAnimate to modern Angular

ngAnimate added CSS classes such as ng-enter and ng-leave when directives like ng-if, ng-repeat and ng-view changed the DOM.

What replaces it

OptionWhen to choose it
CSS animations with animate.enter / animate.leaveThe current approach from Angular 20.2: plain CSS classes applied when elements enter and leave.
@angular/animationsThe older animation package, deprecated since Angular 20.2; still works in existing code.

How to migrate it

  1. List which animations users would actually miss; many legacy animations can be dropped.
  2. Rewrite the ng-enter and ng-leave styles as CSS classes applied on enter and leave.
  3. Check route transitions separately; they depend on the router outlet, not on single elements.

Watch out. Your existing CSS keyframes and transitions can usually be reused. Only the class names and the way they are attached change.

Other libraries

Planning a migration or a micro-frontend platform?

In a 20-minute call you describe your situation and I tell you how I'd approach it. If it isn't worth doing yet, I'll say so.

Message me on LinkedIn