Skip to content

$scope isn't available, generally, to factories #504

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

Merged
merged 2 commits into from
Aug 23, 2015

Conversation

jedgell
Copy link
Contributor

@jedgell jedgell commented Aug 23, 2015

Generally speaking, if you attempt to inject $scope into factories, you'll get an error like the one mentioned in the docs at https://docs.angularjs.org/error/$injector/unpr

Attempting to inject a scope object into anything that's not a controller or a directive, for example a service, will also throw an Unknown provider: $scopeProvider <- $scope error.

All this PR does is clarify the intention of the statement.

…ories.

Per the docs at https://docs.angularjs.org/error/$injector/unpr

Attempting to inject a scope object into anything that's not a controller or a directive, for example a service, will also throw an Unknown provider: $scopeProvider <- $scope error.
Clarified a statement which suggested $scope is injectable into factories
@johnpapa
Copy link
Owner

agreed. thx

johnpapa added a commit that referenced this pull request Aug 23, 2015
$scope isn't available, generally, to factories
@johnpapa johnpapa merged commit 1f615cf into johnpapa:master Aug 23, 2015
johnpapa added a commit that referenced this pull request Aug 28, 2015
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