How to check empty object in angular 2 template using *ngIf
<p>I want to check if my object is empty dont render my element, and this is my code:</p>
<pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;comeBack_up&quot; *ngIf=&quot;previous_info != {}&quot;&gt;
  &lt;a [routerLink]=&quot;['Inside_group_page',{'name':previous_info.path | dotTodash }]&quot;&gt;
    {{ previous_info.title }}
  &lt;/a&gt;
&lt;/div&gt;
</code></pre>
<p>but my code is wrong, what is the best way to do this?</p>