Suppose there is such an object:
var obj ={
{a:1,b:2,c:3},
{a:4,b:5,c:6},
{a:7,b:8,c:9},
}
Used ng-repeat data in obj to display the list, and then modified the value of C through the input box (it should be two-way bound). Then how to submit the specified items in this form (columns a and c)?
<form name="test">
<th>a</th>
<th>b</th>
<th>c</th>
<p ng-repeat='data in obj'>
<tr><td>data.a</td><td>data.b</td><td>data.c</td></tr>
</p>
<form>
<button>.....
I don’t understand something, I hope you can explain it, maybe the html file is not written correctly
Thank you all in advance
淡淡烟草味2017-05-15 16:53:06
obj
应该绑在$scope
中,如$scope.obj=...
,而且obj
should be an arraytd
中的数据应该加花括号如:{{data.a}}
name
属性的,而且都应该是表单域之类的吧,比如input
,select
angular
既然已经数据绑定了,直接在C里面拿到数据,然后异步提交就可以了,用$http
这个service