Fixing a minor regression

This commit is contained in:
Will Marshall
2014-06-19 12:10:05 +10:00
parent 4684c92c6e
commit a7f4256897
5 changed files with 6 additions and 9 deletions

View File

@@ -1,12 +1,11 @@
Darkswarm.controller "ProductsCtrl", ($scope, $rootScope, Product, OrderCycle) ->
$scope.products = Product.products
$scope.loading = Product.loading
$scope.Product = Product
$scope.limit = 3
$scope.ordering = {order: "name"}
$scope.order_cycle = OrderCycle.order_cycle
$scope.incrementLimit = ->
if $scope.limit < $scope.products.length
if $scope.limit < $scope.Product.products.length
$scope.limit = $scope.limit + 1
$scope.searchKeypress = (e)->

View File

@@ -9,6 +9,7 @@ Darkswarm.factory 'Product', ($resource) ->
loading: true
update: =>
@loading = true
@products = $resource("/shop/products").query =>
@loading = false
@