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

All languages needs to be registered #175

Closed
Bramzor opened this issue Jan 17, 2019 · 4 comments
Closed

All languages needs to be registered #175

Bramzor opened this issue Jan 17, 2019 · 4 comments

Comments

@Bramzor
Copy link

Bramzor commented Jan 17, 2019

Im trying to use timeago.js in Angular but have a hard time registering the locales because I cannot use require()

How can I register them all (or a selection) by using only import?

@Bramzor
Copy link
Author

Bramzor commented Jan 17, 2019

Found it, might be an idea to add it to the documentation
import { nl as locale_NL } from 'timeago.js/lib/lang';

@hustcc
Copy link
Owner

hustcc commented Jan 18, 2019

Thanks, I will add the document in README.

if you want import all locales, maybe you can:

import 'timeago.js/dist/timeago.locales.min.js'

@Bramzor
Copy link
Author

Bramzor commented Jan 18, 2019

Great library btw! I like the fact that it is small instead of having to import libraries that are a few MB just for the timeago feature. Thanks a lot!

@hustcc
Copy link
Owner

hustcc commented Jan 19, 2019

😄

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