Struggling with handling null values while looping through a JSON object using AngularJS.
I am still learning the ropes of Angular.
<a href="#" data-mycustom="{{product.related}}">...</a>
If the 'related' property is null:
{
"related":null
}
I aim to substitute it with "-1":
<a href="#" data-mycustom="-1">...</a>
Attempted using a ternary operator but it fails to evaluate correctly and just displays as plain text.