Skip to content

fix(compiler): correct host directive mapping array order#152

Open
ashley-hunter wants to merge 1 commit intovoidzero-dev:mainfrom
ashley-hunter:fix/host-directive-aliases
Open

fix(compiler): correct host directive mapping array order#152
ashley-hunter wants to merge 1 commit intovoidzero-dev:mainfrom
ashley-hunter:fix/host-directive-aliases

Conversation

@ashley-hunter
Copy link

Summary

  • Fixes the host directive mapping array order from [publicName, internalName] to [internalName, publicName] to match Angular's createHostDirectivesMappingArray in view/compiler.ts
  • Updates stale comments in component/definition.rs to reflect the corrected ordering
  • Adds integration tests for host directives with aliased inputs/outputs (mirrors Angular compliance tests host_directives_with_inputs_outputs and host_directives_with_host_aliases)

Test plan

  • Existing unit tests updated and passing
  • New integration tests with insta snapshots verify correct output
  • cargo fmt and cargo clippy clean (no new warnings)

🤖 Generated with Claude Code

…lName, publicName]

The mapping array in `create_host_directive_mappings_array` was emitting
[publicName, internalName] but Angular's `createHostDirectivesMappingArray`
expects [internalName, publicName]. This fixes the ordering and adds
integration tests for host directives with aliased inputs/outputs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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