Subversion Repositories SmartDukaan

Rev

Rev 13556 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13542 anikendra 1
angular.module('starter.services', [])
13556 anikendra 2
.value('apihost',"http://dtrdashboard.saholic.com/")
13542 anikendra 3
.factory('Categories', function($resource,apihost) {
4
  return $resource(apihost+"/categories/?user_id=:me",
5
      {callback: "JSON_CALLBACK"} , 
6
      { all: {
7
          method: "JSONP",
8
         }
9
      }
10
  )}) 
11
.factory('Products', function($resource,apihost) {
13551 anikendra 12
  return $resource(apihost+"store_products/index/:me/page:"+":page",
13542 anikendra 13
      {callback: "JSON_CALLBACK"} , 
14
      { all: {
15
          method: "JSONP",
16
         }
17
      }
18
  )}) 
19
.factory('CategoryProducts', function($resource,apihost) {
13551 anikendra 20
  return $resource(apihost+"store_products/bycategory/:me/page:"+":page",
13542 anikendra 21
      {callback: "JSON_CALLBACK"} , 
22
      { all: {
23
          method: "JSONP",
24
         }
25
      }
13560 anikendra 26
  )}) 
27
.factory('Clicks', function($resource,apihost) {
28
  return $resource(apihost+"clicks/add/:me/:id",
29
      {callback: "JSON_CALLBACK"} , 
30
      { get: {
31
          method: "JSONP",
32
         }
33
      }
34
  )});