Open jeffryang24 opened 9 years ago
Solved!!!! I just add these code to the beginning line of angular-timer.min.js
var humanizeDuration = require("humanize-duration"); // same like my requirejs shim. Also from the humanizeDuration docs at https://github.com/EvanHahn/HumanizeDuration.js
var moment = require("moment"); // same like my requirejs shim
This did NOT work, and the fact that we have to add this to core code smells. This shouldn't be closed, it's still an issue.
agreed.. been wanting to refactor/remove this dependency. But, haven't got a chance
any update on this? Looks like these dependencies are still there and the lib doesnt work with the way its currently documented (just importing lib/angular-timer/dist/angular-timer.js
)
Any update on this. I am facing same error with all js file reference.
The way I am currently able to work with webpack is to add plugin as:
new webpack.ProvidePlugin({ 'moment': 'moment', 'humanizeDuration': 'humanize-duration' })
This issue needs to be reopened.
yup just faced this issue
not sure how i should fix as i do not use require or webpack
Leo-G: In that case, won't adding dependencies js: moment and humanizeDuration before angular-timer fix the issue?
I was hoping I did not have to install and load more dependencies in my app, but if thats the best solution then will do it
I'm just writing my own timer, I can't stand any unnecessary dependencies.
+1 same issue.
My Solution: I added the .js files for moment and humanize-duration to my project directly from bower_components.
having same issue why this issue is closed ?
+1 same issue.
Same issue here..
Same issue
same
I got it to work by adding humanize-duration.js and moment.js after angular-timer.min.js.
Its dependent on these other 2 libraries. Get the libraries from Github.
i have the same issue "humanizeDuration is not defined" in including angular timer
how to solve that ?
I'm getting same error humanizeDuration is not defined...???
I use requirejs for loading my module. In requirejs, I add below code:
But, the console always said that humanizeDuration is not defined, but moment is defined inside angular-timer.min.js