Alexander Kundurdjiev Alexander Kundurdjiev - 1 year ago 75
AngularJS Question

pass input attribute data to other input function parameter - angular

Is it possible to pass ng-disabled data to other input function parameter:

<div ng-repeat="item in properties">
<input type="checkbox" ng-click="checkDisable(isDisable)">
<input type="checkbox" ng-disabled="properties[$index].isDisabled">

plunkr: here

Answer Source

Use the item value in the loop

<div ng-repeat="item in properties track by $index">
      <input type="checkbox" ng-click="checkDisable(item.isDisabled)">
       <input type="checkbox" ng-disabled="item.isDisabled">


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download