My JSON looks like this:
[
{
"firstName": "tom",
"lastName": "null",
"phone": "null",
"status": "Active",
},
{
"firstName": "Bob",
"lastName": "null",
"phone": "null",
"status": "Inactive",
}
]
I am displaying the 2nd property(i,e lastName) of the JSON
object like this:
<div class="form-group" >
<label>Last Name</label>
<input class="form-control" [(ngModel)]="customer.lastName">
</div>
Since its value is null
it displays as null
, Here i need to write condition like this:
If the properties(lastName,phone... ) value is
null
in the input it should not display anything,but input should to visible to the user.