I have array inside a class, and I have to compare if the arrays are same in 2 different objects of the same class. Currently, I am doing it like this,
<div class="col-md-4">{{ctrl.Obj1.arr1}}
<span ng-if="ctrl.Obj2 != null && ctrl.Obj1.arr1 != ctrl.Obj2.arr1"
class="glyphicon glyphicon-alert" style="margin-left: 6px;
font-size: small; color: palevioletred">
</span>
</div>
But this is an incorrect way of comparison since it yields different values. My array is of the form: ["string1","string2","string3"]
What's the correct way to do it?
Edit: My question is different because I am asking about how to accomplish this in AngularJS.