我正在创建一个需要执行以下操作的消息服务 1.) 从我们的消息服务加载消息,获取收件人的 ID,然后从用户服务加载收件人的信息。我已经尝试使用消息服务回调,并在消息对象上创建了一个观察者,但没有多大成功。该服务工作,但它没有将结果正确分配给 $scope。这是控制器。所有服务都正常工作:
function MessageCtrl ($scope, $http, $location, $routeParams, Messages, Members) { 
    if ($routeParams.mid) {  // Checks for the id of the message in the route. Otherwise, creates a new message.
        $scope.mid = $routeParams.mid;
        $scope.message = Messages.messages({mid: $scope.mid}).query();
        $scope.$watch("message", function (newVal, oldVal, scope) {
            if (newVal.data) { 
                $scope.recipients = Members.members({uids: newVal.data[0].uids}).query();
            }
        }, true);
    } else {
        $scope.create = true;
    }
    // Events
    $scope.save = function () { };
    $scope.preview = function () { };
    $scope.send = function () { };  
}