title: Check null value in variable in angular component
body: <p>I have this div</p>
  <pre><code>&lt;td&gt;&lt;a *ngIf=&quot;data?.URL; else noData&quot;  [href]=&quot;data?.URL&quot; target=&quot;_blank&quot;&gt;View
                              File&lt;/a&gt;
                              &lt;ng-template #noData&gt;
                                  &lt;span&gt; No File&lt;/span&gt;
                              &lt;/ng-template&gt;
  
                                 
                          &lt;/td&gt;
  </code></pre>
  <p>in some cases <code>data.URL</code> is <code>null</code> <code>URL: &quot;null&quot;</code> and else there will be file url but in my component in all case View File is displayed.</p>
  <p>another issue is I have url like this <code>https://egdomain/download_.jpg</code> i want to display only the file in the link not the full url like <code>download_.jpg</code></p>
  <p>Any solution to fix this issue</p>