February 2015
Intermediate to advanced
232 pages
4h 40m
English
In our catalog, we will want to update the value of our product. To complete this action, follow these steps:
$.mockjax({
url: /^\/products\/([\d]+)$/,
type:'PUT',
dataType: 'json',
responseTime: 750,
status:200,
responseText: {
'data': {
text: 'Product saved'
}
}
});catalog.html view, in the same cell you have the add-to-cart-button component:<button class='btn btn-info' data-bind='click: $parent.openEditModal'> <i class='glyphicon glyphicon-pencil'></i> </button>
var openEditModal = function (product) { tmpProduct = ProductService.clone(product); selectedProduct(product); ...Read now
Unlock full access