Permalink
Browse files

read a sample of lift results from a file

  • Loading branch information...
1 parent 3dc5190 commit 64d6b94be140e30765c79e49e2f9d9271efb4752 @mikepmunroe committed Feb 22, 2014
Showing with 45 additions and 10 deletions.
  1. +38 −0 app/lifts/lifts.json
  2. +6 −9 app/scripts/controllers/lift.js
  3. +1 −1 app/views/partials/main.html
View
@@ -0,0 +1,38 @@
+[
+ {
+ "name": "Back Squat",
+ "repScheme": "5x",
+ "load": "195",
+ "notes": ""
+ },
+ {
+ "name": "Back Squat",
+ "repScheme": "3x",
+ "load": "225",
+ "notes": ""
+ },
+ {
+ "name": "Back Squat",
+ "repScheme": "1x",
+ "load": "255",
+ "notes": ""
+ },
+ {
+ "name": "Back Squat",
+ "repScheme": "2x",
+ "load": "235",
+ "notes": ""
+ },
+ {
+ "name": "Front Squat",
+ "repScheme": "5x",
+ "load": "155",
+ "notes": ""
+ },
+ {
+ "name": "Front Squat",
+ "repScheme": "5x",
+ "load": "215",
+ "notes": ""
+ }
+]
@@ -1,13 +1,10 @@
'use strict';
angular.module('fitrecordMeanApp')
- .controller('LiftCtrl', function ($scope) {
- $scope.lifts = [
- {'name': 'Back Squat'},
- {'name': 'Front Squat'},
- {'name': 'Clean'},
- {'name': 'Clean & Jerk'},
- {'name': 'Deadlift'},
- {'name': 'Snatch'}
- ];
+ .controller('LiftCtrl', function ($scope, $http) {
+ $http.get('lifts/lifts.json').success(function(data) {
+ $scope.lifts = data;
});
+
+ $scope.orderProp = 'load';
+});
@@ -5,7 +5,7 @@
<div ng-controller="LiftCtrl">
<ul>
<li ng-repeat="lift in lifts">
- {{lift.name}}
+ {{lift.name}} | {{lift.repScheme}} | {{lift.load}}
</li>
</ul>
</div>

0 comments on commit 64d6b94

Please sign in to comment.