angular-timer icon indicating copy to clipboard operation
angular-timer copied to clipboard

'humanizeDuration' is undefined

Open Methodician opened this issue 8 years ago • 3 comments

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 avatar May 10 '16 00:05 Methodician

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

Methodician avatar May 10 '16 16:05 Methodician

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

suamorales avatar Jul 14 '16 19:07 suamorales

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>

samuelpetroline avatar Jan 13 '17 17:01 samuelpetroline