I am trying to get one of two different images to display based on the data returned for that record. I found something that should work but it is always displaying the image for the 'false' value. Any ideas?
Should this be done in the markup as shown below or should it be done in the ts file instead?
<div class='mat-padding' layout="row" layout-wrap>
<mat-card style="width: 350px;">
<mat-card-header [style.backgroundColor]="'orange'">
<mat-card-title>Datafiles</mat-card-title>
</mat-card-header>
<mat-card-content [ngStyle]="{'height':'300px', 'overflow-y': 'auto', 'background-color': 'gray'}" >
<div *ngFor="let l of list | async">
<a [routerLink]="l.id">
<p> {{ l.fileName }} <img src="{{l.layoutPreDefined == false ? 'newlayout.jpg' : 'predefinedlayout.jpg'}}"/> </p>
</a>
<p> {{ l.companyAbbreviation}} {{ l.fileTypeName }}</p>
</div>
</mat-card-content>
</mat-card>
</div>
json for one file:
{
"id": "00000035-0055-0000-0000-000000000000",
"createdByID": "SB25",
"createdDate": "2019-02-21T20:19:20.08",
"modifiedByID": "SB25",
"modifiedDate": "2019-02-21T20:19:20.08",
"hasScheduleA": false,
"showInEligibilityViewer": null,
"fileNameID": "a62ae9dc-cc88-420c-97da-fb3f9e540bf1",
"fileName": "XXXXXXXX",
"companyID": "93b532c1-400f-4c48-9e32-d3dfdda1e3f7",
"companyName": "XXXXXXXX",
"companyAbbreviation": "XXXXXX",
"vendorId": null,
"vendorName": "",
"vendorCode": "",
"policyHolderId": null,
"policyHolderName": "",
"policyHolderCode": "",
"groupNumber": "",
"statusId": "1a88aa14-d30d-45b8-9c74-8e1f2fe4e26a",
"statusName": "Development",
"fileTypeId": "5cf07002-e663-4ba2-9ed3-0cb9f009b4a2",
"fileTypeName": "Eligibility",
"fileFormatId": "0cf3eb1c-769f-4e46-bdf0-d67830f6bf0a",
"fileFormatName": "Fixed Width",
"layoutId": "0a827513-7084-40a4-bbe3-02954f09a524",
"layoutName": "XXXXXXX Eligibility",
"layoutPreDefined": true,
"outputDataFileId": null,
"dataFileNumber": null
},