diff --git a/src/ngCart.js b/src/ngCart.js index 7bc4047..3a3d315 100644 --- a/src/ngCart.js +++ b/src/ngCart.js @@ -150,9 +150,10 @@ angular.module('ngCart', ['ngCart.directives']) this.empty = function () { - $rootScope.$broadcast('ngCart:change', {}); this.$cart.items = []; $window.localStorage.removeItem('cart'); + $rootScope.$broadcast('ngCart:change', {}); + }; this.isEmpty = function () {