Skip to content

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

@jelbourn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerIssues related to `ngc`, Angular's template compilercompiler: extended diagnosticsfeatureIssue that requests a new featuregood first issueAn issue that is suitable for first-time contributors; often a documentation issue.help wantedAn issue that is suitable for a community contributor (based on its complexity/scope).

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions