Sha256: e8e8f1509ff3955ff9c768d68b59d07cdcf4eb599a2fcd381d3389675e1f0b0f

Contents?: true

Size: 375 Bytes

Versions: 1

Compression:

Stored size: 375 Bytes

Contents

app.controller('HomeCtrl', HomeCtrl)

function HomeCtrl(cartService) {
  var vm = this;

  vm.test = '123'

  vm.getCartCount = function() {
    cartService.getCartCount().then(function(res) {
      vm.cartCount = res;
    });
  }

  vm.getCartCount();

  vm.addToCart = function(cartId, productId) {
    cartService.addToCart(cartId, productId);
    vm.getCartCount();
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redshop-0.0.1 app/assets/javascripts/redshop/angular/controllers/home.js