Enable Nullish Coalescing operator in angular template
🚀 feature request
Relevant Package
This feature request is for @angular/core
Description
What do you think about enabling Nullish Coalescing also in angular template?
I often write for example something like this:
<span [title]="variable != null ? variable : ''">
s.t
if variable = 3, title = '3'
if variable = 0, title = '0'
if variable = null, title = '', meaning the html tooltip title is hidden
Describe the solution you'd like
It would be nice in my opinion to write something like:
<span [title]="variable ?? ''">
to obtain the same results with a less verbose syntax.
It may be also helpful in other situations, in template interpolation {{ ... }}, etc
What do you think? Thanks!