0
var getPatientQuestions = function(apiURL, $scope, callback) {

        azureauthetication.invokeApi(apiURL, {
            body:  null ,
            method: "GET"
        }).done(function (results) {
            var PatientQuestions =  (JSON.parse(results.responseText)).CircleQuestion;
            var questionContent = "";
            for(i=0;i<PatientQuestions.length;i++) {
                var question = PatientQuestions[i].question;
                var answer = PatientQuestions[i].answer;
                questionContent = questionContent + '<div class="bubble-right">' + question + '</div> <div class="time-right">4.44pm</div>';
                if(answer != null){
                    questionContent = questionContent + '<div class="bubble-left">' + answer + '</div> <div class="time-right">4.44pm</div>';
                }
            }
            callback(questionContent);
        }, function (error) { 
            hideBusy();
        });

    };

当上述函数被调用时,得到一个错误的长度。

4

0 回答 0