我有一个用户必须回答的问题列表。为此,我准备了一个表单。textArea在angular js中的双向绑定
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>
现在我的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"
}
]
}
}
现在,当用户提交表单我应该得到的评论用户已张贴的所有问题。
你的问题是什么?什么不起作用?你有什么尝试? – StuR
我希望用户在点击提交按钮时发布的所有问题的答案。 – Aks