Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

feat(ngMock): invoke nested calls to module immediately #12887

Closed
wants to merge 1 commit into from
Closed

feat(ngMock): invoke nested calls to module immediately #12887

wants to merge 1 commit into from

Conversation

shahata
Copy link
Contributor

@shahata shahata commented Sep 18, 2015

before this change calling a nested module was just ignored, but it makes sense that ppl might use module() inside some helper function in order to get providers from DI and those helper methods should work no matter if they are called before or during the injector creation.

before this change calling a nested module was just ignored, but it makes sense that ppl might use module() inside some helper function in order to get providers from DI and those helper methods should work no matter if they are called before or during the injector creation.
@shahata
Copy link
Contributor Author

shahata commented Sep 18, 2015

This actually worked in some weird way in angular 1.2 (nested modules were invoked last) since angular.forEach allowed adding items to array during iteration. I noticed it when migrating some app from 1.2 to 1.4, and it was actually really hard to create a workaround without making the code ugly: http://plnkr.co/edit/4XGPuQQGfXBGmMivgbio?p=preview

@shahata
Copy link
Contributor Author

shahata commented Sep 21, 2015

@lgalfaso or @petebacondarwin can you plz take a look?

@shahata
Copy link
Contributor Author

shahata commented Oct 2, 2015

Ping

@petebacondarwin
Copy link
Contributor

LGTM - merging

@shahata shahata closed this in 51a27c0 Oct 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants