You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you subscribe to the observable, you can optionally get an instance of `MetaData` class. This instance contains information related to the emission of the event through the bus. The properties of this instance are:
99
100
100
101
-`id`: A unique identifier of the message sent through the events bus.
101
-
-`key`: Original key associated to the message.
102
-
-`data`: Data associated to message. It's optional.
102
+
-`key`: Original key associated with the message.
103
+
-`data`: Data associated with a message. It's optional.
103
104
-`timestamp`: Time in milliseconds in which the message was generated.
104
105
105
106
```
@@ -152,13 +153,13 @@ These strings will match:
152
153
153
154
### Need to unsubscribe (observable)?
154
155
155
-
Yes, in the normal scenario usage it's necessary you unsubscribe from the observable to avoid memory leaks. That happens because the library exposes an infinite observable. That's no exactly related to the library, but in the way in which the observables work in RxJS.
156
+
Yes, in the normal scenario usage it's necessary you unsubscribe from the observable to avoid memory leaks. That happens because the library exposes an infinite observable. That's not exactly related to the library, but in the way in which the observables work in RxJS.
156
157
157
-
However, there are ways that you don't need to unsubscribe, for example if you use `.first()` in the pipe of the observable because using this method would turn it into a finite observable (It would apply in your case if you're just waiting for a one-time event).
158
+
However, there are ways that you don't need to unsubscribe, for example, if you use `.first()` in the pipe of the observable because using this method would turn it into a finite observable (It would apply in your case if you're just waiting for a one-time event).
158
159
159
160
I recommend you to read this [stackoverflow answer](https://stackoverflow.com/questions/50629357/rxjs-angular-unsubscribe-from-subjects/50633482#50633482) about a similar question.
160
161
161
-
## Release history & changelog
162
+
## Release history and changelog
162
163
163
164
See the [Releases](https://github.com/cristiammercado/ng-event-bus/releases) page for a list of all releases, including changes.
0 commit comments