2017-04-10 6 views

답변

1

당신은 변경 $scope.myDatadiscount 변경을 업데이트들을 수 있습니다. ui-grid에는 $scope.myData에 대한 양방향 바인딩이 있으므로보기를 업데이트합니다. 당신은 input 태그를 다음과 같이 표시됩니다 다음 $scopeupdateValues 기능을 추가

<input class="form-control " data-ng-model="discount" ng-change="updateValues()" type="number"> 

:

$scope.updateValues = function() { 
    // write code to update values here 
} 
0

갈래 당신의 plunker 어떤 임의의 값으로 "X (기본값)"컬럼의 값을 변경합니다.

코드 :

angular.forEach($scope.myData,function(row,idx){ row.x = Math.random(); });

이이 기능을 구현하는 데 사용되는 전문가에 권장되지 않습니다. 대신 함수를 사용하십시오.