AngularJS - 从 table 变化事件中一行的第一列获取值

AngularJS - Getting the Value from the first column of a row in a table on change event

请查看演示该问题的 plunker here

我想在更改任何值时为任何给定行显示相应的英文值(第一列)。因此,例如,当第二个 上的任何值发生更改时,'Uploaded' 应始终显示在弹出窗口中。

我在示例中已经做到了这一点,但还不够:

<textarea ng-model="res.Value"
          ng-change="vm.changed(vm.resourceGridResources.Resources[$index].Resources[0].Value)"
          style="min-width: 300px"></textarea>

以你为例。 不要使用 $index,而是 $parent.$index。 会引用前面ng-repeat$index

<textarea ng-model="res.Value"
          ng-change="vm.changed(vm.resourceGridResources.Resources[$parent.$index].Resources[0].Value)"
          style="min-width: 300px">
</textarea>

Corrected plunkr