JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="app" ng-controller="MainCtrl">
<button ng-click="changeAllValues()">
Change All Values
</button>
<div ng-repeat="name in names" ng-if="name.show">
<span ng-bind="name.label"></span>
<span ng-bind="name.show"></span>
</div>
</div>
JavaScript
angular.module('app', [])
.controller('MainCtrl', function($scope) {
$scope.names = [{
label: 'John',
show: true
}, {
label: 'Jeremy',
show: false
}, {
label: 'Jeff',
show: true
}, {
label: 'Julio',
show: false
}];
$scope.changeAllValues = function() {
angular.forEach($scope.names, function(item) {
item["show"] = !item["show"];
})
}
});