title: How to set value of input field with NgIf in Angular 4
body: <p>I am pretty new with Angular 4 and I have probably basic question for someone who is a bit more experienced than me.</p>
  
  <p>I have input field which value needs to be populated when object <strong>user</strong> exists.
  So basically I need php function isset() in angular 4.</p>
  
  <p>I tried like this but it is not working.</p>
  
  <pre><code>&lt;input class="form-control" type="text"  value="{{ !!user.firstname ? user.firstname : null }}" id="firstname"&gt;
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Tnx</p>