JSFiddle - React, Tailwind, and code Playground

by santhosh lanka

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-route.js"></script>
<div ng-app="app" ng-controller="dummy">
  <table>
    <tr ng-repeat="user in users">
      <td>{{user.id}}</td>
      <td>{{user.name}}</td>
      <td>
        <input type="checkbox" ng-click="usersetting(user)" ng-checked="user.checked" ng-model="user.select">
      </td>
      <td>
        <tt>{{user.select}}</tt> 
        <br/>
      </td>
    </tr>
  </table>
  <button ng-click="checkAll()">Check all</button>
</div>

JavaScript

var app = angular.module("app", []);
app.controller('dummy', function($scope) {
  $scope.users = [{
    id: 1,
    name: "Hello",
    select: 1
  }, {
    id: 2,
    name: "World",
    select: 1
  }, ];
  $scope.checkAll = function() {
    angular.forEach($scope.users, function(user) {
      user.checked = 1;
    });
  }
});