Updating a product

The final feature of this chapter is about updating a product in the products grid. To implement this feature, we will:

  • Update the products client module to add a method to send a request to the server to update a product
  • Update the products grid module to create a method to edit a product
  • Update the products grid module to create a method to update the product
  • Update the view to create a link to update the product

Let's get started by updating the ProductsClient module. Open the ProductsClient module in the productsclient.js file and add a method to send HTTP PUT request to http://[host:port]/products. The method should expect the product model and a callback method as parameters. The callback method should get executed on successful ...

Get KnockoutJS by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.