JSFiddle - React, Tailwind, and code Playground
by apimenov93
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.2/angular.js"></script>
<div ng-app="myApp">
<div ng-controller="TestCtrl">
<div ng-repeat="test in tests">
<div class="tests-container">
<div class="task-title"> [[::test.index]]. [[::test.title]]</div>
<div class="task-container">
<div class="info-box-around-checkboxes agree">Strongly disagree
</div>
<div class="check-box-container">
<input type="checkbox" name="checkboxG3" id="[[::getId(test.index)]]" class="css-checkbox" />
<label for="[[::1+String(test.index)]]" class="css-label"></label>
<!--<input type="checkbox" name="checkboxG3" id="::2+String(test.index)::" class="css-checkbox"/><label for="::2+String(test.index)::"-->
<!--class="css-label"></label>-->
<!--<input type="checkbox" name="checkboxG3" id="::3+String(test.index)::" class="css-checkbox"/><label for="::3+String(test.index)::"-->
<!--class="css-label"></label>-->
<!--<input type="checkbox" name="checkboxG3" id="::4+String(test.index)::" class="css-checkbox"/><label for="::4+String(test.index)::"-->
<!--class="css-label"></label>-->
<!--<input type="checkbox" name="checkboxG3" id="::5+String(test.index)::" class="css-checkbox"/><label for="::5+String(test.index)::"-->
<!--class="css-label"></label>-->
</div>
<div class="info-box-around-checkboxes disagree">Strongly agree
</div>
</div>
</div>
</div>
</div>
</div>
JavaScript
var myApp = angular.module('myApp', []);
alert()
myApp.controller('TestCtrl', ['$scope', function($scope) {
$scope.tests = [{
index: 1,
title: "I stand out in a crowd"
}, {
index: 2,
title: "I stand out in a crowd1"
}, {
index: 3,
title: "I stand out in a crowd1"
}, {
index: 4,
title: "I stand out in a crowd1"
}, {
index: 5,
title: "I stand out in a crowd1"
}];
$scope.getId = function(index) {
console.log(index);
return 0;
}
}]);