|
|
|
|
|
by jhusain
3947 days ago
|
|
Interestingly enough, we actually return Observables. The model returns a Model Response, which inherits from Observable. It also adds a "then" method which returns a promise when called. The primary advantage of using the Observable's "subscribe" method instead of "then" is that you can cancel a request. Netflix makes heavy use of this feature. For example when quickly browsing through titles, we may cancel the request for data that you are no longer looking at. |
|
If I may suggest it, perhaps you might add this a bit more explicitly to the documentation including possibly an example or two that makes use of them as Observables?