# Adding conditional check to display information in Angular 8

I am displaying the following information in angular 8 application. I need to display only the partnerName if it exists.

<h1>Financial Game Plan<br>of <span>{{ name }} and {{ partnerName }} </span> for {{ currentDateString }}</h1>


I have done the following. Could you let me know if it is correct?

TS

 this.name = factFindService.dataModel.client.firstName + ' ' + factFindService.dataModel.client.lastName;
if(factFindService.dataModel.partner) {
this.partnerName = factFindService.dataModel.partner.firstName + ' ' + factFindService.dataModel.partner.lastName;
}


HTML

 <h1>Financial Game Plan<br>of <span>{{ name }} <span *ngIf="partnerName"> and {{ partnerName }} </span> </span> for {{ currentDateString }}</h1>

• The one issue that I see is that and styling is not looking similar to of as it could be probably because of is not in the span tag – Tom Dec 16 '19 at 17:31