Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work in environment with require.js #31

Open
OJezu opened this issue Jan 30, 2015 · 3 comments · May be fixed by #33
Open

Does not work in environment with require.js #31

OJezu opened this issue Jan 30, 2015 · 3 comments · May be fixed by #33

Comments

@OJezu
Copy link

OJezu commented Jan 30, 2015

On our page we use both angular and require.js. This package depends on qrcode.js setting its main function in global, but in presence of define, qrcode.js exports itself as a module. Alas angular-qr tries to call undefined, which tends not to work.

Or I'm doing something wrong, which is always an option.

@OJezu
Copy link
Author

OJezu commented Jan 30, 2015

I have uploaded version which works with AMD to gpndata/angular-qr@4db22355398 . Unfortunately, I'm not angular guy, and I have no idea how karma works, so I did not make new tests yet (the existing ones are passing). If that helps, I can look into karma next week maybe, and then I can make a real pull request.

OJezu pushed a commit to gpndata/angular-qr that referenced this issue Feb 6, 2015
OJezu pushed a commit to gpndata/angular-qr that referenced this issue Feb 6, 2015
OJezu pushed a commit to gpndata/angular-qr that referenced this issue Feb 6, 2015
OJezu pushed a commit to gpndata/angular-qr that referenced this issue Feb 6, 2015
@OJezu OJezu linked a pull request Feb 6, 2015 that will close this issue
@bailsman
Copy link

Would it be better to use https://github.com/umdjs/umd, specifically, https://github.com/umdjs/umd/blob/master/templates/returnExports.js so this also works in webpack?

@ghost
Copy link

ghost commented Feb 11, 2016

+1 for webpack support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants