app.js 515 B

123456789101112131415161718192021222324
  1. (function () {
  2. var app = angular.module('store', []);
  3. app.controller('StoreController', function () {
  4. this.products = gems;
  5. });
  6. var gems = [
  7. {
  8. name: "Dodecahedron",
  9. price: 2.95,
  10. description: "Some gems have hidden qualities beyond their luster, beyond their shine... Dodeca is one of those gems.",
  11. soldOut: false,
  12. canPurchase: true
  13. },
  14. {
  15. name: 'Pentagonal gem',
  16. price: 5.95,
  17. description: " . . . ",
  18. canPurchase: false
  19. }
  20. ];
  21. })();