docs: clarify observables doc with new titles and tooltips (#36023)

PR Close #36023
This commit is contained in:
Judy Bogart 2020-03-11 09:41:54 -07:00 committed by Alex Rickabaugh
parent 1c385a1c22
commit 8e0dec538e
2 changed files with 13 additions and 9 deletions

View File

@ -1,9 +1,13 @@
# Using observables to pass values
# Observables
Observables provide support for passing messages between parts of your application.
They are used frequently in Angular and are the recommended technique for event handling, asynchronous programming, and handling multiple values.
Observables provide support for passing messages between publishers and subscribers in your application. Observables offer significant benefits over other techniques for event handling, asynchronous programming, and handling multiple values.
The observer pattern is a software design pattern in which an object, called the *subject*, maintains a list of its dependents, called *observers*, and notifies them automatically of state changes.
This pattern is similar (but not identical) to the [publish/subscribe](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern) design pattern.
Observables are declarative—that is, you define a function for publishing values, but it is not executed until a consumer subscribes to it. The subscribed consumer then receives notifications until the function completes, or until they unsubscribe.
Observables are declarative—that is, you define a function for publishing values, but it is not executed until a consumer subscribes to it.
The subscribed consumer then receives notifications until the function completes, or until they unsubscribe.
An observable can deliver multiple values of any type—literals, messages, or events, depending on the context. The API for receiving values is the same whether the values are delivered synchronously or asynchronously. Because setup and teardown logic are both handled by the observable, your application code only needs to worry about subscribing to consume values, and when done, unsubscribing. Whether the stream was keystrokes, an HTTP response, or an interval timer, the interface for listening to values and stopping listening is the same.

View File

@ -272,28 +272,28 @@
"children": [
{
"url": "guide/observables",
"title": "Observables",
"tooltip": ""
"title": "Observables Overview",
"tooltip": "Using observables to pass values synchronously or asynchronously."
},
{
"url": "guide/rx-library",
"title": "The RxJS Library",
"tooltip": ""
"tooltip": "The RxJS library provides useful operators."
},
{
"url": "guide/observables-in-angular",
"title": "Observables in Angular",
"tooltip": ""
"tooltip": "How Angular subsystems make us of observables."
},
{
"url": "guide/practical-observable-usage",
"title": "Practical Usage",
"tooltip": ""
"tooltip": "Domains in which observables are useful."
},
{
"url": "guide/comparing-observables",
"title": "Compare to Other Techniques",
"tooltip": ""
"tooltip": "How observables compare to promises and other message passing techniques."
}
]
},