I have table with input=text fields, and when some of fields has id 'four' I need to disable this whole row. For this I try to use this function:
$scope.disableIfRowHasFour = function(row){
var result = row.filter(function(field){
return field.id === 'four';
})
return result.length !== 0;
};
and in html:
<tr ng-disabled='disableIfRowHasFour(row)' ng-repeat='row in tableFields'>
<td ng-repeat='field in row'>
<input type="text" value='{{field.value}}'>
</td>
</tr>
and in devtools I see that row is disabled, but inputs in this row - not.
<tr ng-disabled="disableIfRowHasFour(row)" ng-repeat="row in tableFields" class="ng-scope" disabled="disabled">
where I'm wrong? I expect that all items in a row will be disabled..Plnkr example