<tr ng-repeat="goods in $data">
<td contenteditable='true'>
{{goods.name}}
</td>
</tr>
对td内容进行修改
现在我想获取点击td 弹出当前td的内容。
怎么实现。
<tr ng-repeat="goods in $data">
<td contenteditable='true'>
{{goods.name}}
</td>
</tr>
对td内容进行修改
现在我想获取点击td 弹出当前td的内容。
怎么实现。
<tr ng-repeat="goods in $data track by $index">
<td ng-click=consoleSomeThing($index)>
{{goods.name}}
</td>
</tr>
//js部分
$scope.consoleSomeThing=function(index){
//具体看你的$data结构了,复杂点的就去遍历吧,反正重点是拿到对应的索引index
console.log($data[index].goods.name)
}