I am trying to conditionally style the text in the table based on the time elapsed since the last ping. Specifically, I want to change the color of the text from green to red once 5 minutes have passed and vice versa.
<form name="myform" data-ng-submit="submit()" data-ng-controller="Ctrl" id="submitForm">
<p data-ng-repeat="beat in beats">
Station ID: {{ beat.stationID }}
Uptime: {{ beat.lastPingedAsString | date : 'mediumTime'}}
</p>
<input type="submit" id="submit" value="Submit" />
</form>
I have been researching how to apply formatting using classes, but I haven't been able to get it working properly.
EDIT: Just to clarify, my goal is to create a function that checks if 5 minutes have passed and then changes the color from green to red. Apologies for any confusion.
EDIT2: Here is the original sample (unformatted). I will now implement the new code.
Station ID: default Uptime: Jul 18 2014 2:09PM