title: Angular with Server sent event
body: <p>How can i use server sent event with angular 6. I need to be getting data from backend periodically.  I used it the normal way but it's not working</p>
  
  <pre><code>this.source=EventSource(url);
  </code></pre>
  
  <p>this.source.onmessage=(event) =>alert(event.data);</p>