I'm looping through a json object with AngularJS, and having trouble dealing with nulls.
I'm new to Angular.
<a href="#" data-mycustom="{{product.related}}">...</a>
In the event of related being null:
{
"related":null
}
I want to put a "-1" in its place:
<a href="#" data-mycustom="-1">...</a>
Tried ternary operator but it isn't evaluating... it's just displaying it as plain text.