Guest User

Untitled

a guest
Mar 21st, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $scope.getPods = function() {
  2. if ($scope.customers) {
  3. console.log("Getting pods");
  4. for (i=0; i<$scope.customers.length; i++) {
  5. // FIXME: Check status first
  6. $http.get("/lists/pods/"+$scope.customers[i]["shortname"]+"/ms").then(function(response){
  7. console.log("Got back " + response.data.length + " pods");
  8. });
  9. }
  10. }
  11. };
  12.  
  13.  
  14. If I want that console.log to be
  15.  
  16. "Got back " + response.data.length + " pods for customer " + $scope.customers[i]["shortname"]
  17.  
  18. how can I do that?
Advertisement
Add Comment
Please, Sign In to add comment