Skip to content

Angular expressions should be plain TypeScript expressions #43485

Open

Description

@petebacondarwin

Which @angular/* package(s) are relevant/releated to the feature request?

compiler

Description

This issue is a container for all the issues that have requested new expression syntax features.
The aim is to collect all the features into one place so that we can track the work.
The plan is to do an holistic analysis of the syntax and decide things like:

  1. How close to ECMAScript syntax we want to stay
  2. What are the security implications of exposing particular syntaxes
  3. How to incorporate Angular specific syntax, such as pipes and structural directive microsyntax.

The result will be a project proposal for the changes that we would like to make to the syntax in the short to medium term.

Related Issues

  1. feat(compiler): Support "in" operator in Angular templates #38560
  2. Align with the optional chaining spec #34385
  3. Pipe (|) operator has incorrect precedence (too tight) #27415
  4. Support arrow functions in template syntax #14129
  5. Proposal: Allow computed property names in map expressions #13855
  6. Use the spread operator in template #11850
  7. Allow bigint literals in templates #44852

Activity

  1. added this to the needsTriage milestone on Sep 17, 2021
  2. added
    featureLabel used to distinguish feature request from other issues
    on Sep 21, 2021
  3. modified the milestones: needsTriage, Backlog on Sep 21, 2021
  4. samuelfernandez commented on Oct 16, 2021

    @samuelfernandez

    Could this enhancement for the compiler be included too? #43253

  5. JoostK commented on Oct 16, 2021

    @JoostK
    Member

    Could this enhancement for the compiler be included too? #43253

    That appears to be unrelated to Angular's expression syntax, as it's a request for more accurate type-checking. So we'll keep that one separate.

  6. RobertAKARobin commented on Feb 11, 2022

    @RobertAKARobin

    Really looking forward to seeing this completed! Not having as local-val, and having instead to use *ngIf, is a big turn-off for developers considering Angular or ramping up on Angular projects.

  7. added
    canonicalThis issue represents a canonical design issue in Angular.
    on Sep 22, 2022
  8. changed the title [-]feat(compiler): improvements to the Angular expression syntax[/-] [+]Angular expressions should be plain TypeScript expressions[/+] on May 1, 2024
  9. JeanMeche commented on Jan 3, 2026

    @JeanMeche
    Member
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: compilerIssues related to `ngc`, Angular's template compilercanonicalThis issue represents a canonical design issue in Angular.featureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions