title: rxjs: - receive values emitted before subscribe
body: <p>my <code>emit.next(1)</code> is lost, I want my subscriber to get that value. My subscriber can't subscribe until after the emit has already happened.</p>
  
  <p>This answer suggests publish and connect <a href="https://stackoverflow.com/questions/41281879/rxjs-how-to-get-values-emitted-before-we-subscribe">RxJs: how to get values emitted before we subscribe?</a> however I wasn't sure how to get it working:</p>
  
  <pre><code>console.log('make emit')
  let emit = new Subject&lt;number&gt;();
  console.log('make obs')
  let obs = emit.asObservable()
  console.log('emit 1')
  emit.next(1)
  console.log('subscribe')
  obs.subscribe((v)=&gt;console.log(v,'!'))
  console.log('emit 2')
  emit.next(2)
  console.log('set timeout 1000 to emit')
  setTimeout(()=&gt;emit.next(3),1000)
  console.log('done')
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>make emit
  main.bundle.js:1561 make obs
  main.bundle.js:1563 emit 1
  main.bundle.js:1565 subscribe
  main.bundle.js:1567 emit 2
  main.bundle.js:1566 2 "!"
  main.bundle.js:1569 set timeout 1000 to emit
  main.bundle.js:1571 done
  main.bundle.js:1566 3 "!"
  </code></pre>
  
  <p>it should log <code>1 "!"</code></p>