-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jettisons the timer factory because I just can't figure that one out.
- Loading branch information
1 parent
b193e36
commit a162c88
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var app = angular.module("FirePom", []) | ||
// Factory to keep the timer state | ||
.controller('timerController', ['$scope', '$interval', | ||
function($scope, $interval){ | ||
$scope.timer = {}; | ||
$scope.timer.defaults = {}; | ||
$scope.timer.defaults.pomTime = 1500; | ||
$scope.timer.defaults.shortRestTime = 30; | ||
$scope.timer.defaults.longRestTime = 900; | ||
$scope.timer.state = null; | ||
$scope.timer.timeLeft = $scope.timer.defaults.pomTime; | ||
|
||
}] | ||
) | ||
|
||
|
||
// Seconds to Minutes:Seconds filter | ||
.filter('secondsToString', | ||
function() { | ||
return function(input){ | ||
var s = input % 60; | ||
return Math.floor(input/60) + ':' + ( s < 10 ? ('0'+s) : s ); | ||
}; | ||
} | ||
); |