title: How can i check if else condition in ngstyle background property using angular7?
body: <p>i have a list of cards to be displayed in a <code>component</code>. On each card there is a <code>cover-image</code> whose url is coming from server and there is a ngFor in my <code>component.html</code> like this</p>
  
  <pre><code> &lt;div [style.background-image]="'url('+row.companyId?.coverUrl+')'" class="img-area"&gt;
   &lt;/div&gt;
   &lt;div class="card-content-area"&gt;
    &lt;p class="card-title cursor-pointer" (click)="navigateToCOmpany(row)"&gt;{{row.companyId.name}}&lt;/p&gt;
   &lt;div class="card-description-area"&gt;
      &lt;p class="site-text"&gt;{{row.offer_desc}}&lt;/p&gt;
   &lt;/div&gt;
      &lt;a (click)="referralClick(row, i)" class="site-btn show-desktop-block"&gt;Get referral link&lt;/a&gt;
      &lt;a (click)="referralClick(row, i)" class="site-link-mobile show-mobile-block"&gt;&lt;i class="fa fa-link mobile-link" aria-hidden="true"&gt;&lt;/i&gt; Get Referral link&lt;/a&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>I am getting cover-images in <code>row.companyId.coverUrl</code>. I want to check if <code>row.companyId.coverUrl</code> exist so put the incoming <code>Url</code> but url is not coming form the api so it should put the hardcoded url in background like <code>./assets/img/abc.jpg</code></p>
  
  <p>How can i do that?</p>