Skip to content

[Bug]: Angular signal inputs that are aliased don't work properly #29697

Open
@Ruudt

Description

@Ruudt

Describe the bug

Angular allows to alias inputs, for example when kebab-case attribute names are desired (see here). When I do so and assign such attribute a value in the args list then it seems the signal isn't getting the correct value (InputSignal<string>) but the value itself directly.

Related to #25784 and PR #26413

Reproduction link

https://stackblitz.com/edit/github-gh38gu

Reproduction steps

  1. Go to above link
  2. Navigate to the story Example\Button\Works
  3. Open Devtools' console which will not show errors about backgroundColor (which is aliased)
  4. Navigate to the story Example\Button\Broken
  5. In Devtools' console there will be error messages about backgroundColor only. The attribute foregroundColor is not mentioned and the only difference is it not being aliased in the component.
ERROR TypeError: ctx.backgroundColor is not a function
    at ButtonComponent_Template (template.html:6:3)

The broken story defines both attribute in the args, that seems to "activate" the difference.

System

Storybook Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm <----- active
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @storybook/addon-docs: ^8.5.0-alpha.10 => 8.5.0-alpha.10 
    @storybook/addon-essentials: ^8.5.0-alpha.10 => 8.5.0-alpha.10 
    @storybook/addon-interactions: ^8.5.0-alpha.10 => 8.5.0-alpha.10 
    @storybook/addon-onboarding: ^8.5.0-alpha.10 => 8.5.0-alpha.10 
    @storybook/angular: ^8.5.0-alpha.10 => 8.5.0-alpha.10 
    @storybook/blocks: ^8.5.0-alpha.10 => 8.5.0-alpha.10 
    @storybook/test: ^8.5.0-alpha.10 => 8.5.0-alpha.10 
    storybook: ^8.5.0-alpha.10 => 8.5.0-alpha.10

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions