In my component, I am working with an object that contains a timestamp.
What I aim to achieve is to dynamically check this timestamp in the template at runtime. For instance, I want to display the online status of a member by showing a green dot if they are currently online, and switching to a red dot if they go offline during runtime.
<div class="show_member_line">
{{member.membername}}
<div *ngIf="member.lastactivity > ( !!!new Date().getTime()!!! - 120 )" class="status_online"></div>
<div *ngIf="member.lastactivity < ( !!!new Date().getTime()!!! - 120 )" class="status_offline"></div>
</div>
Does anyone have any suggestions or ideas for how to approach this? :)