February 2015
Intermediate to advanced
232 pages
4h 40m
English
Update those lines of code that have dependencies from the new modules, as follows:
(function() {
"use strict";
$(document).on("click","#confirmOrderBtn", function() {
vm.showOrder();
});
$(document).on("click", ".add-unit", function() {
var data = ko.dataFor(this);
$(document).trigger("addUnit",[data]);
});
$(document).on("click", ".remove-unit", function() {
var data = ko.dataFor(this);
$(document).trigger("removeUnit",[data]);
});
$(document).on("addUnit",function(event, data){
Shop.Services.CartProductService.addUnit(data);
});
$(document).on("removeUnit",function(event, data){
Shop.Services.CartProductService.removeUnit(data);
});
})();You have learned a very good pattern to manage dependencies without any external tools. You ...
Read now
Unlock full access