Skip to content
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

Added route dependency injection for anonymous controllers #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stargazer-2697
Copy link

Fixes lost dependencies when routing with an anonymous controller. See discussion.

@marcoslin
Copy link
Owner

Hi,

Thanks for the pull request. Any reason to change the order of param in the test instead of changing the order of param in the angularAMD?

Sorry if I missed something obvious but day job is sucking every second of my life away at the moment.

@stargazer-2697
Copy link
Author

It's for simplicity really. The PR appends any local dependencies from config.resolve to the $inject property of the proxy controller. Since $scope is also a local dependency, I reordered the params so all the local dependencies will be adjacent. This way, I can simply iterate over arguments[2..n] instead of arguments[0] and then arguments[3..n].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants