We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16e2f5c commit aee0bd6Copy full SHA for aee0bd6
src/angular2-pubsub.service.ts
@@ -1,5 +1,5 @@
1
import { Injectable } from '@angular/core';
2
-import { BehaviorSubject } from 'rxjs/BehaviorSubject';
+import { ReplaySubject } from 'rxjs/ReplaySubject';
3
import { Observable } from 'rxjs/Observable';
4
import { Subscription } from 'rxjs/Subscription';
5
@@ -21,7 +21,7 @@ export class PubSubService implements IPubSubService {
21
}
22
23
if (this.events[event] === undefined) {
24
- this.events[event] = new BehaviorSubject<any>(0);
+ this.events[event] = new ReplaySubject<any>();
25
26
27
if (typeof callback !== 'function') {
0 commit comments