docs: add pipe precedence content angular (#6292)

pull/6296/head
J. Degand 4 months ago committed by GitHub
parent a8f4d32a50
commit da4d141239
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      src/data/roadmaps/angular/content/pipes-precedence@nZxZnzbQg9dz-SI65UHq9.md

@ -1 +1,14 @@
# Pipes Precedence # Pipes Precedence
The pipe operator has a higher precedence than the JavaScript ternary operator.
You should always use parentheses to be sure Angular evaluates the expression as you intend.
```
(condition ? a : b) | pipe
```
Visit the following resources to learn more:
- [@article@Precedence](https://angular.dev/guide/pipes/precedence)
- [@article@What is the precedence between pipe and ternary operators?](https://iq.js.org/questions/angular/what-is-the-precedence-between-pipe-and-ternary-operators)

Loading…
Cancel
Save