0

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.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.