Working with angualrJS Resource
sraparla opened this issue · 1 comments
sraparla commented
http://'+location.hostname+'/ArrestDB-master/Orders/115528/
The orderID is dynamic and so we can't hardcode it. Can we call the resource like this ? please let me know
var formServicesModule = angular.module('formServicesModule',['ngResource']);
formServicesModule.factory('getFormResourceSvc', ['$resource',
function($resource){
return {
getformData: $resource('http://'+location.hostname+'/ArrestDB-master/Orders/')
};
}
]);
getFormResourceSvc.getformData.get({kp_OrderID:$stateParams.orderID},function(response) {
console.info(response);
$scope.formData = response[0];
alixaxel commented
Should be possible but this question is completely unrelated to the project so I'm closing this issue.