You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-12Lines changed: 30 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,9 @@
12
12
13
13
> A Vue.js 2.0 MomentJS library
14
14
15
-
> It just wired moment api to custom filters in Vue : moment() and duration().
16
-
> And also inject moment as **this.$moment** in your components.
17
-
> So you have complete access to the whole api of moment in your templates and also the documentation from [momentjs.com](https://momentjs.com/docs).
18
-
> Just keep in mind that the left value of the filter is the first argument in any of the moment and duration functions.
19
-
> You are good to go now :)
15
+
> Make momentjs available in your template and Vue instance. Since it just try to map raw js function, api is same as[momentjs.com](https://momentjs.com/docs). Making it easier to use in your Vue.js projects.
16
+
17
+
> It added moment and duration as filters and component instance functions ($moment and $duration).
20
18
21
19
> Generated using [vue-cli-template-library](https://github.com/julon/vue-cli-template-library).
22
20
@@ -60,16 +58,16 @@ Vue.use(VueMomentLib);
60
58
<!-- Filter and moment are registered globally -->
61
59
```
62
60
63
-
### After that, you can use the duration and moment filters in your templates:
61
+
### After that, you can use the duration and moment filters in your templates, api is slightly different as the first argument is passed through pipe:
64
62
65
63
```html
64
+
<!-- first argument of moment filter is a parameter for parsing to UTC, it is set by default to false so it is optional when you use default parsing -->
<!-- first argument of moment filter is a parameter for parsing to UTC, it is set by default to false so it is optional when you use default parsing -->
0 commit comments