Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support more binary assignment operators in templates #62064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

crisbeto
Copy link
Member

These changes expand Angular's expression syntax to support the following binary operators in templates:

  • += - addition assignment
  • -= - subtraction assignment
  • *= - multiplication assignment
  • /= - division assignment
  • %= - remainder assignment
  • **= - exponentiation assignment
  • &&= - logical AND assignment
  • ||= - logical OR assignment
  • ??= - nullish coalescing assignment

crisbeto added 4 commits June 13, 2025 09:58
Adds support for the `+=`, `-=`, `*=`, `/=`, `%=`, `**=`, `&&=`, `||=` and `??=` assignment operators to the lexer.
…rser

Updates the expression parser to account for the new assignment operators that were added to the lexer.
Updates the output AST to support the new set of binary operators.
Updates the remainder of the compiler to handle the new assignment operators and sets up more tests, including for the runtime.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Jun 16, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Jun 16, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 16, 2025
Updates the table showing expression syntax to include the new binary operators. Also updates the table of unsupported syntax.
@angular-robot angular-robot bot added the area: docs Related to the documentation label Jun 16, 2025
@crisbeto crisbeto requested a review from devversion June 16, 2025 07:49
@crisbeto crisbeto marked this pull request as ready for review June 16, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler area: docs Related to the documentation detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant