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

fix(injector): check that modulesToLoad isArray. #12285

Closed
wants to merge 1 commit into from

Conversation

mprobst
Copy link
Contributor

@mprobst mprobst commented Jul 7, 2015

When users accidentally just pass a single string, e.g.
angular.injector('myModule'), this change give them a better error message.

Currently Angular just reports that the module with the name 'm' is missing,
as it's iterating through all characters in the string, instead of all strings
in the module.

@lgalfaso
Copy link
Contributor

Thanks for the PR, can you please add a test?

When users accidentally just pass a single string, e.g.
`angular.injector('myModule')`, this change give them a better error message.

Currently Angular just reports that the module with the name 'm' is missing,
as it's iterating through all characters in the string, instead of all strings
in the module.
@mprobst
Copy link
Contributor Author

mprobst commented Jul 31, 2015

@lgalfaso test added, please take another look.

@mprobst mprobst closed this in 5abf593 Aug 3, 2015
netman92 pushed a commit to netman92/angular.js that referenced this pull request Aug 8, 2015
When users accidentally just pass a single string, e.g.
`angular.injector('myModule')`, this change give them a better error message.

Currently Angular just reports that the module with the name 'm' is missing,
as it's iterating through all characters in the string, instead of all strings
in the module.

Closes angular#12285
ggershoni pushed a commit to ggershoni/angular.js that referenced this pull request Sep 29, 2015
When users accidentally just pass a single string, e.g.
`angular.injector('myModule')`, this change give them a better error message.

Currently Angular just reports that the module with the name 'm' is missing,
as it's iterating through all characters in the string, instead of all strings
in the module.

Closes angular#12285
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.

None yet

3 participants