Hello friends i have a div with ngClass:
<div [ngClass]="myValue.length > 0 ? 'myClass1' : 'myClass2' ">
</div>
And its work fine, but in some point of my code, the variable "myValue" become null or empty, and in that point my application goes down because cant read length of undefined.
So... how can i make the "if" inside the ngClass to verify first if myValue isnt null, undefined or empty, before check if the length is > 0