Error: [$injector:unpr] Unknown provider: BigNumberProvider
Recently, I embarked on a new project using Webpack + Angular.JS
and encountered an issue while trying to incorporate Bignumber.js
.
Here's a snippet of my Webpack configuration:
resolve: {
root: [path.join(__dirname, 'assets/libs/bower_components'), 'node_modules']
},
entry: {
entry: ['./app/app.js'],
vendor: [
'lodash',
'bignumber.js',
'angular'
....
Since Bignumber.js is a library, I did not include it as a dependency in my main app.js. However, I am currently facing challenges injecting it into my directive:
app.directive('createpayment', [
'$http',
' * ', // I've tried BigNumber, bignumber, binumber.js but none seem to work
// Unfortunately, the README does not provide any guidance on this issue
function($http, BigNumber ? , bignumber ? ) {