Skip to content

fix: compile animation trigger host bindings to ɵɵsyntheticHostProperty#208

Merged
Brooooooklyn merged 2 commits intovoidzero-dev:mainfrom
ashley-hunter:fix/host-animation-trigger-binding
Apr 3, 2026
Merged

fix: compile animation trigger host bindings to ɵɵsyntheticHostProperty#208
Brooooooklyn merged 2 commits intovoidzero-dev:mainfrom
ashley-hunter:fix/host-animation-trigger-binding

Conversation

@ashley-hunter
Copy link
Copy Markdown
Contributor

Summary

  • Component host bindings: convert_animations_for_host was unconditionally converting all AnimationBindingOp entries to CreateOp::Animation (ɵɵanimateEnter/ɵɵanimateLeave), which is only correct for animate.enter/animate.leave. Host [@trigger] bindings (AnimationBindingKind::Value) now stay in the update list and are reified as ɵɵsyntheticHostProperty.
  • Directive host bindings: The directive's parse_host_property_name was missing the @ animation check, causing host: { '[@slideIn]': 'state' } on directives to emit ɵɵdomProperty instead of ɵɵsyntheticHostProperty.

Closes the issue where components with animation trigger host bindings like host: { '[@slideIn]': 'animationState()' } would throw NG05105: Unexpected synthetic listener at runtime because the animation trigger was silently dropped during compilation.

Test plan

  • Added integration test test_host_animation_trigger_binding for component host animation triggers
  • Added integration test test_directive_host_animation_trigger_binding for directive host animation triggers
  • Added 3 e2e comparison fixtures (animation-host-property-trigger, animation-host-property-trigger-with-style, animation-directive-host-property-trigger)
  • All 43/43 animation e2e fixtures pass at 100% match against the official Angular compiler
  • Full test suite passes with no regressions

🤖 Generated with Claude Code

ashley-hunter and others added 2 commits April 2, 2026 16:12
…icHostProperty

convert_animations_for_host was unconditionally converting all AnimationBindingOp
entries to CreateOp::Animation (ɵɵanimateEnter/ɵɵanimateLeave), which is only
correct for animate.enter/animate.leave bindings. Host [@trigger] bindings
(AnimationBindingKind::Value) need to remain in the update list so they are
reified as ɵɵsyntheticHostProperty in the rf & 2 block.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The directive's parse_host_property_name was missing the @ animation check,
causing host: { '[@slidein]': 'state' } on directives to emit ɵɵdomProperty
instead of ɵɵsyntheticHostProperty.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn merged commit c83c17d into voidzero-dev:main Apr 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants