我有一個用戶必須回答的問題列表。爲此,我準備了一個表單。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