OLD | NEW |
1 angular.module('diff_viewer', []). | 1 angular.module('diff_viewer', []). |
2 config(['$routeProvider', function($routeProvider) { | 2 config(['$routeProvider', function($routeProvider) { |
3 // Show the list of differences by default | 3 // Show the list of differences by default |
4 $routeProvider. | 4 $routeProvider. |
5 otherwise({ templateUrl: '/diff_list.html', controller: DiffListController})
; | 5 otherwise({ templateUrl: '/diff_list.html', controller: DiffListController})
; |
6 }]). | 6 }]). |
7 directive('swapImg', function() { | 7 directive('swapImg', function() { |
8 // Custom directive for showing an image that gets swapped my mouseover. | 8 // Custom directive for showing an image that gets swapped my mouseover. |
9 return { | 9 return { |
10 restrict: 'E', // The directive can be used as an element name | 10 restrict: 'E', // The directive can be used as an element name |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Called by the sort buttons to adjust the metric used for sorting | 94 // Called by the sort buttons to adjust the metric used for sorting |
95 $scope.setSortIndex = function(idx) { | 95 $scope.setSortIndex = function(idx) { |
96 $scope.sortIndex = idx; | 96 $scope.sortIndex = idx; |
97 }; | 97 }; |
98 | 98 |
99 // A predicate for pulling out the number used for sorting | 99 // A predicate for pulling out the number used for sorting |
100 $scope.sortingDiffer = function(record) { | 100 $scope.sortingDiffer = function(record) { |
101 return record.diffs[$scope.sortIndex].result; | 101 return record.diffs[$scope.sortIndex].result; |
102 }; | 102 }; |
103 } | 103 } |
OLD | NEW |