When calling the Subject.subscribe method, an error is output as follows:
TypeError: Cannot read property '_subscribe' of undefined
at BidirectionalSubject._subscribe (Rx.js:10239)
at BidirectionalSubject._subscribe (Rx.js:10239)
at BidirectionalSubject.Observable.subscribe (Rx.js:9924)
at AppComponent.doIt (app.component.ts:32)
at ChangeDetector_AppComponent_0.handleEventInternal (eval at ChangeDetectorJITGenerator.generate (angular2.dev.js:1), <anonymous>:29:29)
at ChangeDetector_AppComponent_0.AbstractChangeDetector.handleEvent (angular2.dev.js:8788)
at AppView.dispatchEvent (angular2.dev.js:9396)
at AppView.dispatchRenderEvent (angular2.dev.js:9391)
at DefaultRenderView.dispatchRenderEvent (angular2.dev.js:7819)
at eventDispatcher (angular2.dev.js:9781)
Check out the Plunkr example here.
This issue is just a piece of a larger problem I am tackling. In my actual code, the subscribe method doesn't throw an error but it doesn't add an observer to the subject, causing no one to receive the emitted data on subject.next invocations.
I suspect the issues are interconnected. In my real code, I am using version 5.0.0-beta.12 of rxjs. However, in the Plunkr example, the rx dependency appears to come from Angular itself.