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
| Option | When to choose it |
|---|---|
| CSS animations with animate.enter / animate.leave | The current approach from Angular 20.2: plain CSS classes applied when elements enter and leave. |
| @angular/animations | The older animation package, deprecated since Angular 20.2; still works in existing code. |
How to migrate it
- List which animations users would actually miss; many legacy animations can be dropped.
- Rewrite the ng-enter and ng-leave styles as CSS classes applied on enter and leave.
- 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
- ui-mask / angular-input-masks
- angular-google-maps / ngMap
- angular-leaflet-directive
- textAngular / ui-tinymce / ng-ckeditor
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