angular.module('sparrow')
.controller('TimedCtrl', function() {

})
.component('timed', {
  controller: 'TimedCtrl',
  templateUrl: 'templates/timed.html'
});
angular.module('sparrow')
.controller('TimedCtrl', function() {
  this.workout = [];
  //workout  contain template created by user.
  this.addWorkout = function() {
    var obj = {};
    obj.activity = this.activity;
    obj.duration = Number(this.minutes || 0) * 60 + Number(this.seconds);
    this.workout.push(obj);
  };
})
.component('timed', {
  controller: 'TimedCtrl',
  templateUrl: 'templates/timed.html'
});
Add addWorkout() which help create a template of workout
Add addWorkout() which help create a template of workout
