All Questions

137
votes
6answers
74244 views

Delegation: EventEmitter or Observable in Angular

I am trying to implement something like a delegation pattern in Angular. When the user clicks on a nav-item, I would like to call a function which then emits an event which should in turn be handled ...
104
votes
12answers
122391 views

possible EventEmitter memory leak detected

I am getting following warning: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace: at EventEmitter.<anonym...
47
votes
6answers
56866 views

NodeJS : How to debug "EventEmitter memory leak detected. 11 listeners added"

How can I debug my application which throw this error: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace at So...
2
votes
2answers
180 views

What is the difference between these two constructor patterns?

Function ConstrA () { EventEmitter.call(this); } util.inherits(ConstrA, EventEmitter); vs Function ConstrA() {} util.inherits(ConstrA, EventEmitter); Is there something that the EventEmitter....
73
votes
6answers
59310 views

Node.js - inheriting from EventEmitter

I see this pattern in quite a few Node.js libraries: Master.prototype.__proto__ = EventEmitter.prototype; (source here) Can someone please explain to me with an example, why this is such a common ...
16
votes
1answers
6040 views

Unable to figure out correct EventEmitter or Observable Syntax in Angular2 Services

I'm having a hard time finding much in the way of examples/guides for using observables in an Angular2 service. There is stuff for html templates binding with EventEmitter but that doesn't seem right ...
13
votes
2answers
16464 views

Angular 2 event broadcast

New to Angular 2. I'm working on broadcast a event between same level component. Currently I know EventEmitter just can transfer a event to upper level component. I have checked this this link and kn...
7
votes
3answers
4029 views

Nodejs EventEmitter - Define scope for listener function

I'd like to have something like this work: var Events=require('events'), test=new Events.EventEmitter, scope={ prop:true }; test.on('event',function() { console.log(this.prop=...
28
votes
2answers
16015 views

Child listens for parent event in Angular 2

In angular docs there is a topic about listening for child events from parents. That's fine. But my purpose is something reverse!. In my app there is an 'admin.component' that holds the layout view of...
21
votes
2answers
5707 views

How do I write non-blocking code in Node.js?

I can write non-blocking I/O in Node.js very easily. It's what the entire library is set up for. But any computation done is blocking. Any message passing over event emitters are blocking. For exam...

Previous Next