Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
  <div ng-repeat="item in items">
    <td align="center"><input type="number" name="test" ng-model="item.qty" ng-model-options="{ updateOn: 'blur' }" ng-change="Save(item)" /></td>
   <td align="center"><input type="number" name="test2" ng-model="item.qty2" ng-model-options="{ updateOn: 'blur' }" ng-change="Save(item)" /></td>
  <td align="center"><input type="checkbox" name="include" ng-model="item.include" ng-model-options="{ updateOn: 'blur' }" ng-change="Save(item)" /></td>
  </div>
</body>
</html>
 
var app = angular.module("myApp", [])
  .controller("myCtrl", ["$scope", function ($scope) {
    $scope.items = [
      {
        qty: "",
        qty2: "",
        include: false
      },
      {
        qty: "",
        qty2: "",
        include: false
      },
    ];
    $scope.Save = function (item) {
      item.qty2 = item.qty;
      item.include = item.qty > 0 ? true : false;
    };
  }]);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers