I've got a series of 2 AJAX requests, with the latter depending on the results of the first. I've put them into the promise of the first returned object. ie.
var productResource = $resource('http://urlhere');
$scope.product = productResource.get();
$scope.product.$promise.then(function(data) {
var depResource = $resource('http://deps/' + data.code );
$scope.deps = depResource.get();
$scope.$apply();
});
I can see the resource is hit with the appropriate data pulled down in my network tab, but my HTML is not updated. I've just got it within {{ }} brackets to see the results. ie.
Prod - {{ product }}
Deps - {{ deps }}
product resolves the product recieved, but deps remain blank. Why is this?