Trying to configure my clock to start at 5:00 and create a button that subtracts 5 seconds each time it's clicked, changing the display to 4:55. I've been struggling with this using JavaScript DateTime functionality and keep receiving the error message "format is not a function". What step am I overlooking?
var dateTime = new moment(300000);
var clock = dateTime.format('m:ss'); //Currently set to display as 5:00
//Button Click
$scope.rewindClick = function () {
clock = dateTime.diff(5000).format('m:ss');
}