我有一个用户必须回答的问题列表.为此,我准备了一个表格.
html表单是
<div class="list" ng-repeat="question in questions.data.Question" >
<div class="item item-divider">
{{question.text}}
</div>
<label class="item item-input" ng-if="question.type =='comment'">
<textarea placeholder="Comments"></textarea>
</label>
</div>
Run Code Online (Sandbox Code Playgroud)
现在我的json字符串是
{
"sucess": true,
"message": "record(s) fetched sucessfully",
"data": {
"Question": [
{
"id": "4",
"text": "how was it?",
"type": "comment"
},
{
"id": "6",
"text": "how was it?",
"type": "comment"
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
现在当用户提交表单时,我应该收到用户发布的所有问题的评论.