Skip to content

Commit

Permalink
update the "input" event's plucking, event.target.value=> event.data
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyunwei committed Nov 15, 2017
1 parent cd9626a commit 69f7aa8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/tutorial/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ input.pluck('target', 'value')
.subscribe(value => console.log(value)); // "h"

// Pass the two previous values
input.pluck('target', 'value').pairwise()
input.pluck('data').pairwise()
.subscribe(value => console.log(value)); // ["h", "e"]

// Only pass unique values through
input.pluck('target', 'value').distinct()
.subscribe(value => console.log(value)); // "helo wrd"
input.pluck('data').distinct()
.subscribe(value => console.log(value)); // "h", "e", "l", "o", " ", "w", "r", "d"

// Do not pass repeating values through
input.pluck('target', 'value').distinctUntilChanged()
.subscribe(value => console.log(value)); // "helo world"
input.pluck('data').distinctUntilChanged()
.subscribe(value => console.log(value)); // "h", "e", "l", "o", " ", "w", "o", "r", "l", "d"
```

0 comments on commit 69f7aa8

Please sign in to comment.