mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(compiler): support exponentiation operator in templates (#59894)
Adds support for the exponentiation (`**`) operator in templates
Ex:
```
@Component {
template: '{{2 ** 3}}'
}
```
PR Close #59894
This commit is contained in:
@@ -53,6 +53,7 @@ Angular supports the following operators from standard JavaScript.
|
||||
| Multiply | `41 * 6` |
|
||||
| Divide | `20 / 4` |
|
||||
| Remainder (Modulo) | `17 % 5` |
|
||||
| Exponentiation | `10 ** 3` |
|
||||
| Parenthesis | `9 * (8 + 4)` |
|
||||
| Conditional (Ternary) | `a > b ? true : false` |
|
||||
| And (Logical) | `&&` |
|
||||
|
||||
Reference in New Issue
Block a user