diff --git a/src/data/roadmaps/angular/content/pipes-precedence@nZxZnzbQg9dz-SI65UHq9.md b/src/data/roadmaps/angular/content/pipes-precedence@nZxZnzbQg9dz-SI65UHq9.md index 63f9a2f74..6e57a872d 100644 --- a/src/data/roadmaps/angular/content/pipes-precedence@nZxZnzbQg9dz-SI65UHq9.md +++ b/src/data/roadmaps/angular/content/pipes-precedence@nZxZnzbQg9dz-SI65UHq9.md @@ -1 +1,14 @@ -# Pipes Precedence \ No newline at end of file +# 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)