Skip to content

Commit 727592e

Browse files
committed
fix filter syntax (close #78)
1 parent 7a854de commit 727592e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

source/api/filters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ Pluralizes the argument based on the filtered value. When there is exactly one a
3232
**Example:**
3333

3434
``` html
35-
{{count}} {{count | pluralize item}}
35+
{{count}} {{count | pluralize 'item'}}
3636
```
3737

3838
*1 => '1 item'*
3939
*2 => '2 items'*
4040

4141
``` html
42-
{{date}}{{date | pluralize st nd rd th}}
42+
{{date}}{{date | pluralize 'st' 'nd' 'rd' 'th'}}
4343
```
4444

4545
Will result in:
@@ -79,7 +79,7 @@ Wrap the handler so it only gets called when the keyCode matches the argument. Y
7979
**Example:**
8080

8181
``` html
82-
<input v-on="keyup:doSomething | key enter">
82+
<input v-on="keyup:doSomething | key 'enter'">
8383
```
8484

8585
`doSomething` will only be called when the Enter key is pressed.

source/guide/events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ It also has a few presets for commonly used keys:
8585

8686
```
8787
<!-- same as above -->
88-
<input v-on="keyup:submit | key enter">
88+
<input v-on="keyup:submit | key 'enter'">
8989
```
9090

9191
Check the API reference for a [full list of key filter presets](/api/filters.html#key).
@@ -98,4 +98,4 @@ You might be concerned that this whole event listening approach violates the goo
9898
2. Since you don't have to manually attach event listeners in JS, your ViewModel code can be pure logic and DOM-free. This makes it easier to test.
9999
3. When a ViewModel is destroyed, all event listeners are automatically removed. You don't need to worry about cleaning it up yourself.
100100

101-
Next up: [Handling Forms](/guide/forms.html).
101+
Next up: [Handling Forms](/guide/forms.html).

0 commit comments

Comments
 (0)