We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aafb90c commit 4ad162dCopy full SHA for 4ad162d
src/v2/guide/filters.md
@@ -26,14 +26,18 @@ filters: {
26
}
27
```
28
29
-or define a filter globally:
+or define a filter globally before creating the Vue instance:
30
31
``` js
32
Vue.filter('capitalize', function (value) {
33
if (!value) return ''
34
value = value.toString()
35
return value.charAt(0).toUpperCase() + value.slice(1)
36
})
37
+
38
+new Vue({
39
+ // ...
40
+})
41
42
43
Below is an example of our `capitalize` filter being used:
0 commit comments