title: Conditionally emit observable
body: <p>We have an Angular 4 app with Redux (ngrx 4).</p>
  
  <p>We keep the info "isLoggedIn" in the ngrx/store, and when we issue a call to the http, we have to first check if he's authenticated or not.</p>
  
  <p>What we're struggling with is the implementation of the service making the http calls:</p>
  
  <pre><code>export class GetDataFromREST() {
  
       constructor(private http: HttpClient, private loginStore: Store) {
            this.loggedIn$ = this.loginStore.select(getLoggedIn);
       }
       ...
       public getProducts(): Observable&lt;ProductList&gt; {
  
            return /*observable that returns http.get(api) only 
                     after the loggedIn$ emits true */
       }
  }
  </code></pre>
  
  <p>Note that logging in should not be a concern of the service - once logged in it should execute all calls that were asked from it.</p>
  
  <p>Any thoughts?</p>