-
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
Brodcast module load event invoke multiple time. #64
Comments
Hi, could you do me a plunkr with the bug in question so that I can check if your hotfix is the right solution ? |
http://plnkr.co/edit/HjbEEigCaLrdqgR4JpZ6?p=preview Note: in the source code lot of ";" missed at the end of function. |
Thanks, I'll take a look at it this afternoon |
Ok I found the problem, we add the required modules foo, bar & bar2 to the "to-load" modules list, but then for each module we add also load the dependencies. The fix is a bit more complicated than your hot fix because we need to take into account that sometimes people want to reload the config/run functions of those modules. I think that I know how to fix it but I have to make more test to be sure that I don't break anything. Anyway, thanks for the report ! I'll let you know once it's fixed. |
It's fixed in 0.3.7 ! |
Hi!
In "register" function get called with registerModules and didn't check the module is loaded or not.
e.g.:
angular.module("foo" , ["bar","bar2"]);
When it resolved the bar and bar2 is brodcasted , but when it resolve foo it call register function again
and broadcast bar and bar2 again.
I made a hot fix in line 680 with the following check:
if(regModules.indexOf(moduleName) !== -1) {
registerModules.pop();
continue;
}
The text was updated successfully, but these errors were encountered: