Subversion Repositories SmartDukaan

Rev

Rev 13551 | 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', [])
13555 anikendra 2
.value('apihost',"http://dtr.shop2020.in/")
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
      }
13555 anikendra 26
  )});