JSFiddle - React, Tailwind, and code Playground

by Brandon

HTML

<div ng-app="myApp" ng-controller="Controller">
  <div ng-repeat="country in countries track by $index">
    <label><input type="checkbox" ng-model="countries[$index].id" ng-true-value="'{{countries[index].name}}'" ng-false-value="''">{{countries[$index].name}}</label>

  </div>
</div>

JavaScript

var app = angular.module('myApp', []);
app.controller('Controller', function($scope) {

  $scope.countries = [
    {"name":"Afghanistan","id":"AFG","country-code":"004"},
    {"name":"Ă…land Islands","id":"ALA","country-code":"248"},
    {"name":"Albania","id":"ALB","country-code":"008"},
    {"name":"Algeria","id":"DZA","country-code":"012"}
  ]

});