I need to display different text based on the value of a property, showing "offline" if camera.key is null and "online" otherwise. Here's the template I'm using:
<h3>Camera sensors</h3>
<table>
<th>Name</th>
<th>Last update</th>
<th>Sensor Status</th>
<tr *ngFor="let camera of sensorStatusCollection.cameraSensors">
<td>{{ camera.key }}</td>
<td>{{ camera.latestTimestamp }}</td>
<td *ngIf ="camera.key === null ? 'online' : 'offline' "></td>
</tr>
</table>
Can someone advise what needs to be declared in the TypeScript section for this functionality? Thank you.