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

ScopeProvider error when injecting $scope into a controller when using v0.5 #192

@ChrisPearce

Description

@ChrisPearce

I'm seeing a scope provider error with v0.5 of new Angular Router (n.b. it didn't seem to be present in v0.4).

The error message is:
[$injector:unpr] Unknown provider: $scopeProvider <- $scope <- TestController↵http://errors.angularjs.org/1.4.0-beta.6/$injector/unpr?p0=%24scopeProvider%20%3C-%20%24scope%20%3C-%20TestController
n.b. This error is swallowed and displays only as a warning "Could not instantiate controller TestController" in the console.

I've created a Plunker that demonstrates the issue at http://plnkr.co/edit/dPaCCogHwNYjgvyvTP9R?p=preview.

The Error only occurs when $scope is injected into the Test Controller.
If I remove the $scope injection from the controller, I then see no errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions