dylanfprice / hutmap

The code that powers hutmap.com
Other
3 stars 2 forks source link

filters reimagining #12

Closed dylanfprice closed 11 years ago

dylanfprice commented 11 years ago

The filter format ($scope.f in FilterCtrl) is not so great. We can do better:

$scope.f.{filter} = {
  'key': {
    include: false,
    $tooltip: 'blah',
    $position: 0
  }
}
...
$scope.position = function(filter) {
  return filter.$position;
};

and

<li ng-repeat="(type, data) in $scope.f.{filter} | orderBy:position">
  ...
</li>