siddii / angular-timer

re-usable/inter-operable AngularJS timer directive ⛺
http://siddii.github.io/angular-timer/
MIT License
793 stars 939 forks source link

yearUnit is always undefined #222

Open j4ques opened 8 years ago

j4ques commented 8 years ago

Hello,

I've tried to use this example from your example website:

<timer interval="1000" language="fr" >{{yearUnit}}</timer>

Unfortunately, I only get "undefined" as result for this. I've imported humanize-duration.js, moment-with-locales.js and angular-timer.js.

When I try this:

<timer countdown="10" interval="1000">{{countdown}}</timer>

The countdown is being correctly presented. Am I missing something?

Thanks a lot.

siddii commented 7 years ago

@delphiactual - yearUnit comes from timeUnits - https://github.com/siddii/angular-timer/blob/master/app/js/_timer.js#L236

which is from i18nService - https://github.com/siddii/angular-timer/blob/master/app/js/_timer.js#L175

Can you see if secondUnit or minuteUnit is working? If not, then something might be broken due to dependencies.

siddii commented 7 years ago

The version used for HumanizeDuration in the website is https://github.com/siddii/angular-timer/blob/master/bower_components/humanize-duration/bower.json#L14

Worth the shot