json - AngularJS extra data in request -



json - AngularJS extra data in request -

i'm trying create function sends info form server. server sends id of created entry. id should sent server info field group. i've done similar jquery, in case wasn't able force id info "data2".

it shows error "data2.push() not function". doing wrong?

$scope.createnew = function() { var info = $scope.fields1; var data2 = $scope.fields2; $http.post("myurl", data) .success(function(response) { data2.push('rid' , response.id[0]); <------- add together id response sec request $http.post("myurl2", data2) .then(function(data) { $location.url('/entry/' + response.id[0]); }); }); }

json angularjs post

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -