为什么quest.answer就是出不来,我只想把数组array中的answer放入数组questions中,两个数组相关联的array数组的cid 和question的id值是相等的
html
<tr ng-repeat="quest in questions>
<td ng-bind="quest.q_number"></td>
<td ng-bind="quest.answer"></td>
</tr>
js
$scope.questions = [];
$scope.last_questions = [];
$http.get('{{ action('xxxx@getAjaxQuestions') }}').then(function(response) {
$scope.questions = response.data.questions;
$scope.array = response.data.array;
for(var i = 0; i<$scope.last_questions.length; i++){
var temp = {};
$scope.temp.id = $scope.array[i].cid;
$scope.temp.q_number = $scope.array[i].answer;
questions.push(temp);
}
}, function(response) {
});
Deity0
相关分类