I couldn't find the answer anywhere. Is there a way to dynamically set the record database names while updating it via $http
request?
$scope.patchSingle = function(key, recordName, recordValue) {
$http.patch('https://DATABASE_ADDRESS/'+key+'.json', { recordName: recordValue})
.success(function(result){
console.log('success');
})
.error(function (result) {
console.log('error');
});
};
I just need to make recordName
variable dynamically set by ptachSingle
function argument in $http.patch
request.