index.html 791 B

12345678910111213141516171819202122232425
  1. <!DOCTYPE html>
  2. <html ng-app="store">
  3. <head lang="en">
  4. <meta charset="UTF-8">
  5. <title>AngularJS Store</title>
  6. <link rel="stylesheet"
  7. type="text/css"
  8. href="../bootstrap/css/bootstrap.min.css"/>
  9. <script type="text/javascript" src="../angular/angular.min.js"></script>
  10. <script type="text/javascript" src="app.js"></script>
  11. </head>
  12. <body ng-controller="StoreController as store">
  13. <!-- Products Container -->
  14. <div class="list-group" ng-hide="store.product.soldOut">
  15. <!-- Product container -->
  16. <div class="list-group-item" ng-repeat="product in store.products">
  17. <h1>{{ product.name }}</h1>
  18. <h2>${{ product.price }}</h2>
  19. <p>{{ product.description }}</p>
  20. <button ng-show="store.product.canPurchase"> Add to cart</button>
  21. </div>
  22. </div>
  23. </body>
  24. </html>