I have implemented this event source .But, its not working on IE as suggested by many i am using
https://github.com/remy/polyfills/blob/master/EventSource.js this pollyfill for IE.
which was suggested by
Is there a Microsoft equivalent for HTML5 Server-Sent Events?
In my code where i need this EventSource i have done like this:
require('../../../style/vendors/EventSource.js'); --> In My Import
ngOnInit()
{
let es = new EventSource('http://localhost:8080/api/message');
}
But, again when running on IE i am getting the error what i was getting earlier :
"ReferenceError: 'EventSource' is undefined
at MessageComponent.prototype.ngOnInit (http://localhost:8080/js/app.8c7c223048ac731c6001.js:42531:10)
Please suggets me whether am missing anything or the Problem with Pollyfills?