Skip to content

new Model inputs are not recognized and show up as an error in templates #2207

@jayanth-ts

Description

@jayanth-ts

🐞 bug report

Is this a regression?

Yes ( used to work in version 19.2.4, and broke since version 20.0.0 )

Description

When using the new model() for two binding between component, after declaring it in the component and attempting to use it in the template while in the parent component, the linter throws an error similar to;

Type 'WritableSignal<string>' is not assignable to type 'string'.ngtsc(2322) the code will compile and work properly but the the language service would report it as an error anyways

Bug Type

What does this bug affect

  • [x ] Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

Steps to reproduce the behavior:

  1. Go to any component and declare a model()
  2. Provide a value to that model in the template when using it in some parent component.

Expected behavior

It should not consider the Writable Signal type and only check the type of the inner value, and not show an error if they match. the type should have been showing as ModelSignal<string> which it used to show before but stopped after since version 20.0.0 (was working before that)

Screenshots

If applicable, add screenshots to help explain your problem.

Image Image

What it used to show up as in v19.2.4:
Image

🌍 Your Environment

Angular Version:



20.0.3

Extension Version:



20.2.2

VSCode Version:



1.104.0 (insiders)

Operating System:



Windows 11 24H2 OS Build 26100.4946

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions