How to make an observer to return as observable?
<p>I'm new to rxjs and would like some help on how to solve this.</p>

<p>I want to pass an <code>Observer</code> to <code>onAuthStateChanged()</code>, which takes an observer object.  The observer would do some work and emit a boolean value such that the boolean value can be returned as an <code>Observable</code>.  How do I go about implement this bridge of from observable to observer?</p>

<pre><code>export class AuthGuard implements CanActivate {

constructor(private firebase: FirebaseService, private router: Router) {
}

canActivate(): Observable&lt;boolean&gt; {
    this.firebase.auth.onAuthStateChanged(/* an observer */)
    return /* an Observable&lt;boolean&gt; */
    }
}
</code></pre>