Use Observable in Template
<p>I am trying to use an observable in my template by:</p>
<pre><code>&lt;md-nav-list&gt;
    &lt;a md-list-item *ngIf=&quot;!isAuth() | async&quot; [routerLink]=&quot;['login']&quot; (click)=&quot;sidenav.toggle()&quot;&gt;Login&lt;/a&gt;
    &lt;a md-list-item *ngIf=&quot;isAuth() | async&quot; (click)=&quot;logout()&quot; (click)=&quot;sidenav.toggle()&quot;&gt;Logout&lt;/a&gt;
&lt;/md-nav-list&gt;
</code></pre>
<p>and in my module:</p>
<pre><code>isAuth(): Observable&lt;boolean&gt; {
  return this.loginservice.getAuthenticated()
    .map(user =&gt; {
      if (user) {
        if (user.hasOwnProperty('uid')) {
          return true;
        } else {
          return false;
        }
      } else {
        return false;
      }
    })
}
</code></pre>
<p>So my problem:</p>
<p>if i am loggedin and the observable returns true -&gt; cool my menu item appears</p>
<p>but if the observable returns false -&gt; my menu is empty -&gt; whats wrong ?</p>