2-way binding of textArea in angular js

后端 未结 2 1456
迷失自我
迷失自我 2021-01-20 02:11

I have a list of question that user has to answer.For that a have prepared a form.

The html form is

2条回答
  •  忘掉有多难
    2021-01-20 02:32

    You have to bind ng-model to the textarea, it works even if you don't have the "answer" variable in your initial json data. I have added a button for demo purpose. Full example on JSFIDDLE

    {{question.text}}

提交回复
热议问题