Created
August 5, 2015 19:07
-
-
Save mbuttler/933732bb4c74058f45bd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
app.controller('MainController', ['$scope', function($scope) { | |
$scope.exercises = [ | |
{ | |
icon: 'img/pushup.jpg', | |
name: 'Pushups', | |
count: 20 | |
}, | |
{ | |
icon: 'img/squat.jpg', | |
name: 'Squats', | |
count: 15 | |
}, | |
{ | |
icon: 'img/pullup.jpg', | |
name: 'Pullups', | |
count: 10 | |
}, | |
{ | |
icon: 'img/row.jpg', | |
name: 'Rows', | |
count: 10 | |
}, | |
{ | |
icon: 'img/lunge.jpg', | |
name: 'Lunges', | |
count: 10 | |
}, | |
{ | |
icon: 'img/stepup.jpg', | |
name: 'Step Ups', | |
count: 10 | |
}, | |
{ | |
icon: 'img/situp.jpg', | |
name: 'Sit Ups', | |
count: 15 | |
} | |
]; | |
$scope.increase = function(index) { | |
$scope.excercises[index].count += 1; | |
}; | |
$scope.decrease = function(index) { | |
$scope.excercises[index].count -= 1; | |
}; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment