JSFiddle - React, Tailwind, and code Playground
by megaadriano
HTML
<html ng-app="app">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.7.0/angular.js"></script>
</head>
<body>
<div ng-controller="Ctrl">
<label ng-repeat="campo in campos">
<input type="checkbox"
ng-true-value="{{ campo }}"
ng-false-value="undefined"
ng-model="campos_selecionados[$index]">
{{ campo.nome }}
</label>
<pre>{{ campos_selecionados | json }}</pre>
</div>
</body>
</html>
JavaScript
var app = angular.module('app', []);
app.controller("Ctrl", function ($scope){
$scope.campos = [{nome: "Brasil"}, {nome: "Argentina"}, {nome: "Paraguai"}];
$scope.campos_selecionados = [];
})