Hi Patricio
Do something like this in your controller: (BTW, $http should be used in
services, never in controllers. Follow-up answer, yes you can inject
services in services.. ;) )
telForm.getAll().then(function (response) {
var1 = response.telephone;
var2 = response.token;
$http({
method:'POST',
url:"http://www.example-server.com/" + telephone + "/" + token +
"/example",
data : {
phone: $scope.phone,
company: $scope.company,
contract: '1',
privacy: '1',
email: $scope.email
},
headers: {
'Content-Type': 'application/json'
}
})
});
Also, you should switch to using .then instead of using .success (it's
deprecated iirc)
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.