Skip to content

Commit

Permalink
Jettisons the timer factory because I just can't figure that one out.
Browse files Browse the repository at this point in the history
  • Loading branch information
camilopayan committed Jun 27, 2015
1 parent b193e36 commit a162c88
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions js/app.js
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 );
};
}
);

0 comments on commit a162c88

Please sign in to comment.