So far, we have all the products showing in the
/products path. If we click on details, nothing happens. Let's fix that, and also add the rest of the
CRUD (create-read-update-delete) functionality.
We will build a server-less CRUD; the data will be stored in memory. Nonetheless, when we build the RESTful API in the next chapter, we just need to replace our in-memory storage for the
$http service. The rest of the application would remain working the same way.
For that, let's refactor our product service to return public methods:
Query to return all the products and
get to get a single product from the collection.
update are self-explanatory:
/* clients/app/products/products.service.js */ ...