JSFiddle - React, Tailwind, and code Playground

by Shital Agarwal

HTML

<body ng-app="myApp">
    <div ng-controller="ExampleController">
        <button type="button" ng-disabled="!toggle">Click</button>
        <div>
            <input type="checkbox" ng-model="selectedAll" class="checkbox" ng-click="toggle=!toggle">
        </div>
        <div ng-repeat="item in items">
            <!-- <input type="checkbox" ng-click="checked(toggle)" ng-model="selectedCheckBox[item.id]"> -->
            <input type="checkbox" ng-click="checked(toggle)">{{item.id}}<i></i>

        </div>
    </div>
</body>

JavaScript

angular.module('myApp', [])
     .controller('ExampleController', ['$scope', function ($scope) {
     $scope.arr = "adsadasdas";
     $scope.submit = function () {
         //var jsonOb = {"A":"B"};
         $scope.arr = "Submit function called!!!";
         /* $http.post(URL,jsonOb).
        success(function(response) {
            console.log('got it' + response);
            $scope.arr=response;
        }).
        error(function(data, status, headers, config) {
        //console.log('nufin' + status);
                console.log(window.location.pathname);

        });*/
     }
     $scope.checked = function () {
         $scope.toggle = !$scope.toggle;
     }
     $scope.items = [{
         id: 1,
         age: 25,
         gender: 'boy'
     }, {
         id: 2,
         age: 30,
         gender: 'girl'
     }];
     $scope.toggle = false;
     $scope.selectedIntervention = {};


 }]);