siddii / angular-timer

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

'humanizeDuration' is undefined #259

Open Methodician opened 8 years ago

Methodician commented 8 years ago

Looks like there have been a few issues related to 'humanizeDuration' possibly having to do with an AngularJS update but mine looks a little different and hopefully simple?

I keep getting "ReferenceError: 'humanizeDuration' is undefined" (twice on each page load) when using the timer. So far, it just doesn't work.

Methodician commented 8 years ago

It appears that my error is due to dependencies on external libraries. Following this stackoverflow question, I included the two libraries in my app and it works! This represents a significant overhead and it would be nice if the dependency was made explicit and obvious in documentation. Add these files: moment.js humanizeDuration.js

suamorales commented 8 years ago

getting the same errors. I used bower-install to install moment.js and humanizeDuration, but still not seeing my timer. @Methodician

samuelpetroline commented 7 years ago

You should import the script into the page:

<script src="bower_components/momentjs/min/moment-with-locales.min.js"></script>

<script src="bower_components/humanize-duration/humanize-duration.js"></script>