It will be nice if we can tell the user the time left to complete the workout and not just the duration of every exercise. We can add a countdown timer somewhere in the exercise pane that shows the overall time remaining.
The approach that we are going to take here is to define a scope variable
workoutTimeRemaining. This variable will be initialized with the total time at the start of the workout and will reduce with every passing second till it reaches zero.
workoutTimeRemaining is a numeric value but we want to display a timer in the format (hh:mm:ss), we need to do a conversion between the seconds data and the time format. AngularJS filters are a great option for implementing such features. ...