title: Angular Filter on a computed property?
body: <p>I am trying to use $filter on a calculated property and it does not appear to work. I have not been able to find any similar examples and have tried everything I can think of.</p>
  
  <p>Here is the controller:</p>
  
  <pre><code>    function PriceAnalyticsCtrl($scope, $filter, products, productService) {
      var vm = $scope;
  
      vm.title = "Price Analytics";
  
      // Computed property
      for (var i = 0; i &lt; products.length; i++)
      {
          products[i].marginPercent = function () {
              return productService.calculateMarginPercent(products[i].price, products[i].cost);
          };
          products[i].marginAmount = function () {
              return productService.calculateMarginAmount(products[i].price, products[i].cost);
          };
      };
  
      var orderedProducts = $filter('orderBy')(products, 'marginPercent');
  
  }
  </code></pre>
  
  <p>I am first adding two computed properties. I am then ordering by one of them.</p>
  
  <p>Is there a way to order by a calculated property?
  Thanks!</p>