How can I force my view to render null values into the template as a blank space?
<table>
<tr *ngFor="let key of keys">
<!-- may evaluate to null but I want the row anyway -->
<td>{{ foo[key]}}</td>
</tr>
</table>
The null value is output as empty content, which collapses the cell. The same thing happens if the cell contains only space characters. To get a non-collapsed cell, you can insert an unbreakable space in it when the value is null:
<td>{{ foo[key] || " " }}</td>
See this stackblitz.
Straight-forward solution for this that I've used many times:
<td>{{ (foo[key] || '') }}</td>
td