I need to make a http request depeendent upon the response of a json object. I have the specific string in the $scope.id object. My code is this
app.controller('test', function($scope, $http) {
$http.post("http://127.0.0.1/flat.json", {"key": "value"})
.then(function (response) {$scope.id = response.data.id;});
});
I want to add another http request that would be:
http://127.0.0.1/{{id}}
I have tried everything that I can think of to generate this request, but i either get "undefined" variable or the script fails to execute.