Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 9 additions and 8 deletions.
  1. +7 −6 app/scripts/controllers/lift.js
  2. +1 −1 app/views/index.html
  3. +1 −1 app/views/partials/main.html
View
13 app/scripts/controllers/lift.js
@@ -1,10 +1,11 @@
'use strict';
angular.module('fitrecordMeanApp')
- .controller('LiftCtrl', function ($scope, $http) {
- $http.get('lifts/lifts.json').success(function(data) {
- $scope.lifts = data;
- });
+ .controller('LiftCtrl', ['$scope', '$http',
+ function ($scope, $http) {
+ $http.get('lifts/lifts.json').success(function(data) {
+ $scope.lifts = data;
+ });
- $scope.orderProp = 'load';
-});
+ $scope.orderProp = 'load';
+}]);
View
2 app/views/index.html
@@ -61,11 +61,11 @@
<script src="scripts/controllers/login.js"></script>
<script src="scripts/controllers/signup.js"></script>
<script src="scripts/controllers/settings.js"></script>
+ <script src="scripts/controllers/lift.js"></script>
<script src="scripts/services/auth.js"></script>
<script src="scripts/services/session.js"></script>
<script src="scripts/services/user.js"></script>
<script src="scripts/directives/mongooseError.js"></script>
- <script src="scripts/controllers/lift.js"></script>
<!-- endbuild -->
</body>
</html>
View
2 app/views/partials/main.html
@@ -4,7 +4,7 @@
<div ng-controller="LiftCtrl">
<ul>
- <li ng-repeat="lift in lifts">
+ <li ng-repeat="lift in lifts | orderBy:orderProp">
{{lift.name}} | {{lift.repScheme}} | {{lift.load}}
</li>
</ul>

No commit comments for this range

Something went wrong with that request. Please try again.