JSFiddle - React, Tailwind, and code Playground
by Richard Houltz
HTML
<div ng-app="myApp">
<div ng-controller="MyCtrl">
<div ng-show="isDifferent">Different</div>
</div>
</div>
JavaScript
angular.module("myApp", []).
controller("MyCtrl", function($scope){
$scope.myArray = [{name:'ted', age:'18', gender: 'm'},
{name:'bob', age:'18', gender: 'm'},
{name:'ben', age:'19', gender: 'm'}
];
angular.forEach($scope.myArray, function(value, key) {
if ($scope.myArray[0].age != value.age){
$scope.isDifferent = true;
return false;
}
});
});