1; (function (ng) { 2 'use strict'; 3 4 var CartMiniCtrl = function (cartService) { 5 6 var ctrl = this; 7 8 ctrl.cartData = {}; 9 10 cartService.getData().then(function (data) { 11 ctrl.cartData = data; 12 }); 13 14 ctrl.addMinicartList = function (miniCartList) { 15 ctrl.list = miniCartList; 16 }; 17 18 ctrl.triggerClick = function (event) { 19 if (event != null) { 20 event.preventDefault(); 21 } 22 23 if (ctrl.cartData.TotalItems > 0) { 24 ctrl.list.cartToggle(true); 25 } 26 }; 27 28 ctrl.updateAmount = function (value, itemId) { 29 30 var item = { 31 Key: itemId, 32 Value: value 33 }; 34 35 cartService.updateAmount([item]); 36 }; 37 38 }; 39 40 ng.module('cart') 41 .controller('CartMiniCtrl', CartMiniCtrl); 42 43 CartMiniCtrl.$inject = ['cartService']; 44 45})(angular);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.