title: Angular 4 Ngif directive how to use
body: <p>I want to know why I have to use this directive <code>&lt;div *ngIf="show"&gt;Text to show&lt;/div&gt;</code> when I have to show some text/form that comes from http call.
  I know if I don't use it angular gives me some error like: </p>
  
  <blockquote>
    <p>var a is undefined</p>
  </blockquote>
  
  <p>because when i am displaying html the varible binded doesn't contain any value.
  But is it a best practice? Is always necessary when we have situation like this?
  And are there better ways to do this?</p>