take

signature: take(count: number): Observable


If you want to take a variable number of values based on some logic, or
another observable, you can use takeUntil or
!


take - 图3
Example 1: Take 1 value from source

( jsBin |
)

Example 2: Take the first 5 values from source
Example 3: Taking first click loclation

(jsFiddle)


  • :dollar: - André Staltz