JSFiddle - React, Tailwind, and code Playground

by takuan

HTML

<div ng-app>
    <div ng-controller="MyCtrl">
        <span ng-click="resetall()"> reset </span>

        <input type="radio" ng-repeat="item in items" ng-model="item.checked" />
    </div>
</div>

JavaScript

function MyCtrl($scope) {
    $scope.items = [{
        checked: false
    }, {
        checked: false
    }, {
        checked: false
    }, {
        checked: false
    }];
    $scope.resetall = function () {
        $scope.items.forEach(function (item, i) {
            item.checked = false;
        });
    };
}