diff --git a/ko-cart/index.html b/ko-cart/index.html index 25684d2..c0338fa 100644 --- a/ko-cart/index.html +++ b/ko-cart/index.html @@ -11,6 +11,34 @@

Product

+ +
+ ID: +
+ Name: +
+ Price: +
+ Stock: +
+
+
ID:
diff --git a/ko-cart/js/models/product.js b/ko-cart/js/models/product.js index d958856..97aa885 100644 --- a/ko-cart/js/models/product.js +++ b/ko-cart/js/models/product.js @@ -1,9 +1,10 @@ +"use strict"; var Product = function (id, name, price, stock) { "use strict"; - var _id = id, - _name = name, - _price = price, - _stock = stock; + var _id = ko.observable(id), + _name = ko.observable(name), + _price = ko.observable(price), + _stock = ko.observable(stock); return { id: _id, name: _name,