http://siddii.github.io/angular-timer/examples.html#/angularjs-single-timer
Trying to get a simple timer directive to work on a fitness app, the 3rd line
<ion-view view-title="Add/Edit Workout" ng-controller="WorkoutEditsCtrl">
<ion-nav-buttons side="secondary">
<h3><timer /></h3>
<!-- <h1 class="title">{{workout.name}}</h1> -->
<button class="button button-icon ion-compose"ng-click="addEx(); startTimer()"></button>
</ion-nav-buttons>
<ion-content>
It seems to have installed correctly in bower, in my index.html I have this line and it seems fine:
<script src="lib/angular-timer/app//js/_timer.js"></script>
than in my controller file :
var contollers = angular.module('CovalentFitness.controllers', ['timer'])
contollers.controller('WorkoutEditsCtrl', function($scope, $location, $ionicModal, WorkoutServices) {
//Timer
// $scope.timerRunning = true;
// $scope.startTimer = function (){
// $scope.$broadcast('timer-start');
// $scope.timerRunning = true;
// };
// $scope.stopTimer = function (){
// $scope.$broadcast('timer-stop');
// $scope.timerRunning = false;
// };
// $scope.$on('timer-stopped', function (event, data){
// console.log('Timer Stopped - data = ', data);
// });
})
this has worked before for previous directives I've installed... this is the error I get
Error: [$injector:unpr] Unknown provider: I18nServiceProvider <- I18nService