-
Notifications
You must be signed in to change notification settings - Fork 510
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
Issue with ui.bootstrap or AngularStrap while loading files with object syntax #71
Comments
Do you load ui bootstrap & angularstrap with your app at the beginning and they are then defined as dependencies in the loaded modules ? |
It's loaded in index.html and added to main module as dependency. I don't understand what should I do with |
In the config of your application, you can config the ocLazyLoadProvider like this: $ocLazyLoadProvider.config({
loadedModules: ['ui.bootstrap', 'mgcrea.ngStrap']
}); |
Ok, not really, same issue. |
Damn that was my best bet :) |
Can't reproduce the issue in a plunkr. I've lost so much time. I don't use the object notation and it works now. Thank you. |
hmm ok, I'll keep this open because there might be a bug here that I'll need to investigate, thanks for the follow up ! |
This solved it for me. I added a config that told ocLazyLoadProvider what modules I already had loaded. var mashupApp = angular.module('mashupApp', ['ngRoute', 'ui.bootstrap', 'ngSanitize', 'oc.lazyLoad']); angular.module('mashupApp').config(['$ocLazyLoadProvider', function ($ocLazyLoadProvider) {
}]); |
Fixed in 0.3.9 ! |
Does this mean I no longer need to do what I suggested above where I tell ocLazyLoad what I have loaded? |
Yes, it should work without it (unless you use angular.bootstrap, in which case it is still necessary). |
Hi,
Sorry for the title, but I have a big problem here.
Everywhere I use something like this:
But when I have to use a directive in ui.bootstrap or AngularStrap the directive code is runned twice.
For example, when I try to use ui.bootstrap
tooltip
ortypeahead
directive, I always got this error:when I try to use AngularStrap
typeahead
directive, I always got this: mgcrea/angular-strap#1149 or even mgcrea/angular-strap#1122It took many hours to find that the problem was with your loader. If I remove the object syntax, it works. Example, this still throws an error:
It's OK:
But I can't load my other files... I have to find a quick solution. If I have no better option today, I won't use the object load syntax and I will load all services in my
index.html
...Any help appreciated. ;)
Bests
The text was updated successfully, but these errors were encountered: