Back to Developer Roadmap

Pipes Precedence

src/data/roadmaps/angular/content/[email protected]

4.0512 B
Original Source

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: