All transaction-based ControlService methods now return promises directly, which makes it easier to integrate with other promises, is simpler and opens up new refactoring opportunities.

This commit is contained in:
Simo Kinnunen
2014-04-15 16:56:13 +09:00
parent 4270d9589c
commit f46540e51e
5 changed files with 23 additions and 29 deletions

View File

@@ -86,9 +86,9 @@ module.exports = function ActivitiesCtrl($scope) {
$scope.selectedPackageName + '/' + $scope.selectedActivityName
}
var cmd = $scope.control.shell(command)
return cmd.promise.then(function (result) {
console.log(result)
})
return $scope.control.shell(command)
.then(function (result) {
console.log(result)
})
}
}