Skip to content

Commit 08abb47

Browse files
docs: correct minor problems with the guide to migrating global filters (#599)
1 parent f15e2f7 commit 08abb47

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/guide/migration/filters.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ Instead of using filters, we recommend replacing them with computed properties o
7575

7676
### Global Filters
7777

78-
If you are using filters that were globally registered and then used throughout our app, it's likely not convenient to replace them with computed props or methods in each individual component.
78+
If you are using filters that were globally registered and then used throughout your app, it's likely not convenient to replace them with computed properties or methods in each individual component.
7979

80-
Instead, you can make your global filters available to all components through `app.globalProperties`:
80+
Instead, you can make your global filters available to all components through [globalProperties](../../api/application-config.html#globalproperties):
8181

8282
```javascript
8383
// main.js
8484
const app = createApp(App)
8585

8686
app.config.globalProperties.$filters = {
87-
accountInUSD(num) {
88-
return '$' + num
87+
currencyUSD(value) {
88+
return '$' + value
8989
}
9090
}
9191
```
@@ -95,7 +95,7 @@ Then you can fix all templates using this `$filters` object like this:
9595
```html
9696
<template>
9797
<h1>Bank Account Balance</h1>
98-
<p>{{ $filters.accountInUSD(accountInUSD) }}</p>
98+
<p>{{ $filters.currencyUSD(accountBalance) }}</p>
9999
</template>
100100
```
101101

0 commit comments

Comments
 (0)