June 2014
Intermediate to advanced
696 pages
38h 52m
English
When the user clicks an image in the products list, the product page view is rendered. Listing 28.14 shows the AngularJS code used for the product page view. Notice that the product information is displayed using AngularJS expressions that access the $scope.product value. The Add to Cart button sends product._id to the addToCart() function in the controller, which adds the print to the cart. Figure 28.3 shows the rendered product page view, which shows the image, name, description, quantity, and price, as well as the Add to Cart button.
Listing 28.14 product.html: Implementing the partial product details template with an Add to Cart button
01 <div id="productContainer">02 <img ...
Read now
Unlock full access