绑定一个对象

时间:2018-05-17 10:41:12

标签: angularjs

我有这个HTML代码:

<td style="max-width:29px" ng-repeat="measure in item.measures"
    ng-click="changeValues(measure)" ng-model="formData.dataChanged">
  {{measure.column[measure.column.length-1].value}}
  <span ng-show="measure.column.length>1">*</span>
</td>

使用此格式绑定值可以做些什么?我希望此对象{{measure.column[measure.column.length-1].value}}对其他数组值有效。

我尝试这样的事情:

$scope.measure = ($scope.measure) ? $scope.measure : {};
$scope.measure.column = ($scope.measure.column) ? $scope.measure.column : {};
$scope.measure.column[$scope.measure.column.length-1].value = $scope.popupData[0].valueItem;

0 个答案:

没有答案