angular.module('archie').factory('archieService',function($http, liftAppConfig) { var sServerRoot = liftAppConfig.restServer; var archieService = {}; archieService.GetSampleArchies = function () { var url = sServerRoot + '/api/GetSampleArchies'; return $http.get(url); }; archieService.GetAllArchies = function () { var url = sServerRoot + '/api/GetAllArchies'; return $http.get(url); }; archieService.GetUom = function () { var url = sServerRoot + '/api/Uom'; return $http.get(url); }; archieService.SavePayload = function (archie) { var url = sServerRoot + '/api/values/archie'; return $http.post(url, archie); }; return archieService; });