I have a small expression to check whether 2 objects are different or not, in order to display this element (via adding class name):
<div ngClass='{{JSON.stringify(obj1) != JSON.stringify(obj2) ? "div-show" : ""}}'></div>
The problem is I get this error:
Cannot read property 'stringify' of undefined.
What I need a way to work around, or a proper solution if available. Thanks.
PS: I use JSON.stringify() to compare 2 simple objects, nothing fancy here.