title: The element is not shown using ng-if even the condition is true
body: <p>I use <code>ng-if</code> to display/hide some elements in page, as follows:</p>
  
  <pre><code>&lt;span ng-if="user.name == ''||user.name ==null"&gt;Name：No Data&lt;/span&gt;
  &lt;span ng-if="user.name != ''&amp;&amp; user.name !=null" ng-bind="'Name：' + user.name"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>but these two elements are shown no matter <code>user.name</code> is set or not. I confirmed in the console of Chrome that the condition is true when running with debug mode.
  It worked after I replaced <code>ng-if</code> with <code>ng-show</code>, I'm really confused with this.</p>
  
  <p>Appreciated for any clarification. Thanks!</p>
  
  <p>Update:</p>
  
  <p>This is my <code>$scope.user</code>:</p>
  
  <pre><code>var u = {
      'loginId': mb,
      'mobile': mb.substr(0,3 ) + "****" + mb.substr(7, 11),
      'account': mb.substr(0,3 ) + "****" + mb.substr(7, 11),
      'score': data.score,
      'email': data.email,
      'name': data.name,
      'id': data.id
  };
  $scope.user = u;
  </code></pre>
  
  <p>Now I do have the value for <code>user.name</code>, I tried the suggestions provided below, this is my test result. </p>
  
  <p><a href="https://i.stack.imgur.com/FQ878.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FQ878.png" alt="The first one"></a></p>
  
  <p><a href="https://i.stack.imgur.com/JIXA9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JIXA9.png" alt="The second one"></a></p>