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

Doesn't support AMD loaders like requireJS #246

Closed
m-amr opened this issue Oct 19, 2015 · 6 comments
Closed

Doesn't support AMD loaders like requireJS #246

m-amr opened this issue Oct 19, 2015 · 6 comments

Comments

@m-amr
Copy link

m-amr commented Oct 19, 2015

I am using requireJS as asynchronous module loader, i configured requireJS with the path of angular-loading-bar but when i load it using require i can't found the module.

@the-unsoul
Copy link

I am using the same combination, of requireJS + angular-loading-bar
And it working as normally for me, I am asumming that your question was about you couldn't see the loading bar when requireJS loading its modules, right?

@m-amr
Copy link
Author

m-amr commented Oct 21, 2015

At requireJs.config
1- i added this line to the pathes
loadingBar:'bower_components/angular-loading-bar/build/loading-bar.min',

2-and i use shim to add angular as dependency for that module
loadingBar: {
exports: 'loadingBar',
deps:['angular']
},

i have my mainAngularModule called appModule;
what i am trying to do is to add the loadingBar module as a dependency in my appModule

var loadingBar = require('loadingBar');
console.log(loadingBar);
//display undefined

var appModule = angular.module('appModule', [
loadingBar.name
]);

it throw error because loadingBar is undefined
but when i added the module name as string it works

var appModule = angular.module('appModule', [
'chieffancypants.loadingBar'
]);

@m-amr
Copy link
Author

m-amr commented Oct 22, 2015

This pull request will solve this Issue
https://github.com/chieffancypants/angular-loading-bar/pull/248/files

@the-unsoul
Copy link

+1

1 similar comment
@attila226
Copy link

+1

@faceleg
Copy link
Collaborator

faceleg commented Mar 17, 2016

Closing, refer to #248

@faceleg faceleg closed this as completed Mar 17, 2016
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

No branches or pull requests

4 participants