-
Notifications
You must be signed in to change notification settings - Fork 43
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
Provide examples for loading other angular modules #2
Comments
Hi @mariussoutier - the standard angularjs distribution comes bundled with many things. If you do something like:
(depending on where your Play distro is) ...then you'll see what's available. Thus
should be all that you need. If there are things that you cannot find as a WebJar then please feel free to submit an issue/PR at the WebJars github repo. Thanks. |
Thanks for your answer. I do use |
Ah, yes, that's a problem. We need to enhance the angular webjar project so that it shims these other angular modules and declares their dependencies. Take a look at the bootstrap webjar src/main/resources to see what I mean. In bootstrap's case it declares a dependency on jQuery. I'll reopen this and create a pr to attend to it (unless you beat me to it! ;-) ). Meanwhile if you declare a webjars!angular.js dependency in the define statement for the cookies module then you can work around the issue for now. |
Strangely, even that doesn't seem to work. So far the only reliable way was to set priority and dependencies explicitly in |
Actually that makes sense as both angularjs-config.js and angularjs will be loaded in parallel.... you'll need to use requirejs.config for now. |
I'm going to take care of this issue here: |
Upgrade to Play 2.2.0
Any non-trivial project will make use of the other AngularJS modules (cookies, i18n, ...). Could you please provide examples what's the recommended way of loading them using WebJars and making sure that AngularJS is loaded before its submodules?
Currently I'm using a manual config along the lines of:
Thanks.
The text was updated successfully, but these errors were encountered: