Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(documentation): Update share documentation #2694

Merged
merged 1 commit into from Sep 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/operator/share.ts
Expand Up @@ -10,7 +10,11 @@ function shareSubjectFactory() {
* Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
* Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
* unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
* This is an alias for .publish().refCount().
*
* This behaves similarly to .publish().refCount(), with a behavior difference when the source observable emits complete.
* .publish().refCount() will not resubscribe to the original source, however .share() will resubscribe to the original source.
* Observable.of("test").publish().refCount() will not re-emit "test" on new subscriptions, Observable.of("test").share() will
* re-emit "test" to new subscriptions.
*
* <img src="./img/share.png" width="100%">
*
Expand Down