Thursday, December 6, 2018

difference between Eventemitter and Subject

The Angular2 team stressed the fact though, that EventEmitter should not be used for anything else then @Output()s in components and directives.

The Angular team has stated that they may change the underlying implementation of EventEmitter and break user code that uses EventEmitter for something it wasn't intended for. That's the main difference.

Which one is better in the case of cross-component communication?
Event emitter is built on top of the subject. A subject is better to use in cas

No comments:

Followers

Link