Angular & Signals (283 Qs)•Part 8: Internationalization (i18n), Testing & DOM Directives (177 - 212)
What are the list of template expression operators?
The Angular template expression language supports three special template expression operators.
- Pipe operator
- Safe navigation operator
- Non-null assertion operator
Practical Code Example
html
<!-- Template Expression Operators: -->
<!-- 1. Pipe operator (|) -->
<p>{{ today | date:'shortDate' }}</p>
<!-- 2. Safe Navigation operator (?.) -->
<p>{{ user?.address?.city }}</p>
<!-- 3. Non-null assertion operator (!) -->
<p>{{ user!.profile!.email }}</p>