Blame view
app/scripts/services/tshirt.js
1.92 KB
422e7837d
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
define(['app'], function (app) { 'use strict'; app.factory('$t_shirt', function ($http, $rootScope) { var DATA = [ { info: { name: '', description: '', price: '', gender: '', image: '' }, place_design: {}, color: [ { name: 'color: 2E GRAY', code: '#d0d0cd', img: { front: 'images/t-shirt/1/gray/front.png', back: 'images/t-shirt/1/gray/back.png' }, }, { name: 'color: 00 BLACK', code: '#23282e', img: { front: 'images/t-shirt/1/black/front.png', back: 'images/t-shirt/1/black/back.png' }, }, { name: 'color: 3B ORANGE', code: '#e2583b', img: { front: 'images/t-shirt/1/orange/front.png', back: 'images/t-shirt/1/orange/back.png' }, } ] }]; return { getTShirtColor : function(key) { if (typeof DATA[key] == 'undefined'){ return []; } return DATA[key]['color']; }, getAll: function(){ return DATA; }, getList: function(category){ if (typeof DATA[category] == 'undefined'){ return []; } return DATA[category]; } }; }); }); |