Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[help][vuejs] can it use with vue-moment in vuejs? #141

Open
librix opened this issue May 4, 2020 · 1 comment
Open

[help][vuejs] can it use with vue-moment in vuejs? #141

librix opened this issue May 4, 2020 · 1 comment

Comments

@librix
Copy link

librix commented May 4, 2020

import VueMoment from 'vue-moment'
var momentDurationFormatSetup = require("moment-duration-format");
momentDurationFormatSetup(vue-moment);

console.log(typeof this.$moment.duration.fn.format === "function");

TypeError: Cannot set property 'format' of undefined

@mariadb-ThienLy
Copy link

You have to use it this way :
momentDurationFormatSetup(Vue.moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants