Skip to content

Add extended diagnostic for referencing a function in a text interpolation #59157

Closed

Description

@jelbourn

We should have an extended diagnostic that warns if you reference a function in a text interpolation expression

@Component({
  /* ... */
  template: '<p> {{ firstName }} </p>',
})
export class UserProfile {
  protected firstName() {
    return 'Morgan';
  }
}

This would be very similar to the "Signals must be invoked in template interpolations" diagnostic

Activity

  1. added
    feature
    good first issue
    open for contributions
    on Dec 11, 2024
  2. ShivanshCharak commented on Dec 13, 2024

    @ShivanshCharak

    Understood so to fix the issue i need to make a new file with all the desired test cases?
    The way it is written in
    packages/compiler-cli/src/ngtsc/typecheck/extended/test/checks/interpolated_signal_not_invoked/interpolated_signal_not_invoked_spec.ts

  3. added
    area: compiler
    on Dec 18, 2024
  4. added this to the Backlog milestone on Dec 18, 2024
  5. kiennguyen2403 commented on Jan 19, 2025

    @kiennguyen2403

    Hi @jelbourn,
    I would like to work on this issues as my first contribution. Can I ask what is the current status of this issue?

  6. jelbourn commented on Jan 29, 2025

    @jelbourn
    ContributorAuthor

    Looks like there's already a PR for it: #59191

  7. dominicbachmann commented on Jul 24, 2025

    @dominicbachmann
    Contributor

    @jelbourn Can we close this issue as the according pr was merged?

  8. angular-automatic-lock-bot commented on Aug 24, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilercompiler: extended diagnosticsfeaturegood first issueopen for contributions

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions