title: angular service call within success of previous service call
body: <p>I have three angular service call in which service call 2 and 3 are should be made on the result of an value from the 1st service call. But my code is not hitting the second service call at all. Please find the code snippet below.</p>
  
  <pre><code>  datacontext.GetUnitRegistration(serialNumber, customerId).then(function (response) {     //1st service call   
              vm.SerialNumber = serialNumber;
              vm.UnitRegistration = response;
              vm.errorMsg = config.constantValues.NoRecordsFoundMsg;
  
                      document.getElementById('hdnHasClaims').value = vm.UnitRegistration.UnitWarranty.isEligWarr;
  
                      if (vm.UnitRegistration.UnitWarranty.isEligWarr == true) {
                          datacontext.GetUnitComfortPlanClaimList(serialNumber).then(function (result) {//2ndst service call   
                              if (result.Success == false) {
                                  vm.exceptionMsg = vm.exceptionMsg + result.responseText;
                                  vm.HasException = true;
                                  vm.HasComfortPlanClaimsResults = false;
  
                              }
                              else {
                                  if (result.length == 0) {
                                      vm.HasComfortPlanClaimsResults = false;
                                  }
                                  else {
  
                                      vm.HasComfortPlanClaimsResults = true;
                                  }
  
                                  $scope.ComfortPlanGrid.data = result;
  
                              }
                              spinner.spinnerHide();
                              $scope.$apply();
                          }).fail(function (error) {
                              spinner.spinnerHide();
  
                          });
  
                          datacontext.GetUnitStandardClaimList(serialNumber).then(function (result) { //3rd service call   
                              if (result.Success == false) {
                                  vm.exceptionMsg = vm.exceptionMsg + result.responseText;
                                  vm.HasException = true;
                                  vm.HasUnitStandardClaimList = false;
                              }
                              else {
                                  if (result.length == 0) {
                                      vm.HasUnitStandardClaimList = false;
                                  }
  </code></pre>
  
  <p>Thanks
  Vijay</p>