Files
angular/packages/core/test
Jessica Janiuk de5889ec4f fix(core): support function and signal bindings in animate.enter and animate.leave
When using property bindings for animate.enter or animate.leave (e.g. `[animate.enter]="myFn"` or `[animate.enter]="mySignal"`), the template pipeline wraps the binding expression into a getter function. At runtime, `getClassListFromValue` previously invoked the passed value only once. If the evaluated expression was itself a function (such as an arrow function, method reference, or Signal), the returned value remained a function instead of a string or array. Consequently, it failed the type checks and returned null, silently preventing the enter or leave animation from executing.

This change updates `getClassListFromValue` to recursively unwrap functions until a concrete class value or null/undefined is reached. In addition, `AnimationClassValue` is introduced as a recursive union type to ensure full TypeScript type safety without casting.

Fixes #70764

(cherry picked from commit 9a06a73907)
2026-09-18 16:37:10 +00:00
..
2026-09-09 17:23:07 +02:00
2025-12-16 14:44:19 -08:00