Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added route dependency injection for anonymous controllers#132

Open
stargazer-2697 wants to merge 2 commits into
marcoslin:master from
stargazer-2697:master
Open

Added route dependency injection for anonymous controllers #132
stargazer-2697 wants to merge 2 commits into
marcoslin:master from
stargazer-2697:master

Conversation

@stargazer-2697

@stargazer-2697 stargazer-2697 commented Mar 16, 2015

Copy link
Copy Markdown

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

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /