I am having issues with implementing the angular timer directive with the ionic framework. http://siddii.github.io/angular-timer/
When I implement the code using bow
as per your comments, I am providing another answer... the stopwatch factory, that I am using in my project. as per your requirement you can use service like below :
checkout the PLUNKER to have a practical example.
Initially you see instruction page, where timer is initialized to 2 hours.
Then move to questions 1, where timer starts
from question 1 you can go to help page, where the timer pauses
then you move back to question 2, where timer resumes...
on how to use :
start init it on first page
app.controller('view1Ctrl', function($scope, $csCountdown){
$csCountdown.init(2 * 3600); // 2 hours
$scope.countdown = $csCountdown.data;
})
start the counter on second page
app.controller('view2Ctrl', function($scope, $csCountdown){
$csCountdown.start();
$scope.countdown = $csCountdown.data;
})
you can display the value on any page using countdown.stringValue
Time : {{countdown.stringValue}}