Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Promise.all(asyncArray)
  2.                         .then(
  3.                             function () {
  4.                                 console.log(1);
  5.                                 // images are saved
  6.                                 $scope._saveProgressInfo.status = 'Сохранение завершено';
  7.                                 $scope._saveProgressInfo.step = $scope._saveProgressInfo.steps;
  8.  
  9.                                 // Закрыть модалку
  10.                                 $scope.$root.is_loading = false;
  11.                                 $scope.$root.addAlert("Рацион успешно сохранен", "success", 5000);
  12.  
  13.                                 // TODO: verify
  14.                             },
  15.                             function () {
  16.                                 $scope.$root.is_loading = false;
  17.                                 $scope.$root.addAlert("Ошибка при сохранении изображений", "danger", 5000);
  18.                             }
  19.                         ).then(
  20.                             function () {
  21.                                 console.log(2);
  22.                                 console.log($scope.last_meal_save_data);
  23.                                 $scope.getMealData();
  24.                             }
  25.                         );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement