With the follow expression I'm expecting for Angular to interpolate a date (if not null) through the date pipe, but I get the proceeding error.
{{charge.offenseDate ? charge.offenseDate | date : 'No date'}} EXCEPTION: Error: Uncaught (in promise): Template parse errors: Parser Error: Conditional expression {{charge.offenseDate ? charge.offenseDate | date : 'No Date' }} requires all 3 expressions at the end of the expression
Is what I'm expecting possible, or just a...pipe dream :)
Just wrap it with ()
()
{{charge.offenseDate ? (charge.offenseDate | date) : 'No date'}}
1.4m articles
1.4m replys
5 comments
57.0k users