Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: No language undefined when using HumanizeDuration.js with angular-timer

Tags:

angularjs

I'm trying to get to get angular-timer working. So far I'm not having much luck.

I'm getting an Error: No language undefined. error message in the console. This refers to line 228 in humanize-duration.js:

throw new Error("No language " + dictionary + ".");

I can't see anything wrong with what I'm doing. I've included the files exactly as the introduction page

Any help with this would be greatly appreciated.

like image 862
user1532669 Avatar asked May 30 '26 06:05

user1532669


1 Answers

Have you add the language attribute to the tag?

<timer countdown="10" language="en" interval="1000" finish-callback="callbackTimer.finished()">{{minutes}}:{{seconds}}</timer>

There you can check which are supported: https://github.com/EvanHahn/HumanizeDuration.js#supported-languages

like image 53
Marco Mantovani Avatar answered Jun 01 '26 09:06

Marco Mantovani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!