Angularjs $ resource persistence not working
I am saving data with $ resource but not working, I am new to angularjs, any help would be appreciated.
controller.js
$scope.create = function () {
$scope.risk.createdDate = new Date();
RiskService.save($scope.risk, function () {
$('#successModal').modal('show');
$scope.clear();
});
};
SERVICE.JS
RiskService.save = function () {
return $resource('/app/rest/risk/:id', {}, {
'query': {
method: 'GET',
isArray: true
},
'get': {
method: 'POST'
}
});
};
+3
source to share
No one has answered this question yet
Check out similar questions: