app.factory('myService', function ($http) { return { // 1st function serverCall: function (purchaseid) { return $http.get('/po/poidsearchid/' + purchaseid).then(function (response) { console.log(response.data); console.log("Hi in server call"); return response.data; }); }, // 2nd function anotherFunctionCall: function (poid) { //console.log("Hi in another call"); $http.post('/po/poid', poid); console.log("Hi in another call"); }, // 3rd function anotherFunctionCall1: function (poiditems) { $http.post('/po/poiditems', poiditems) console.log("Hi in another call 1111"); }, anotherFunctionCall2: function (purchaseid) { return $http.get('/po/poiditemssearchid/' + purchaseid).then(function (response) { console.log(response.data); console.log("Hi in another call 222"); return response.data; }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)