O'Reilly logo

KnockoutJS by Example by Adnan Jaswal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required