Skip to content

Unknown provider: $$stateProvider <- $$state (ui.router.compat) #1010

@onsails

Description

@onsails

Hello, I am migrating my app from angular-route to angular-ui-router. I removed ngRoute from app dependencies, added ui.router.compat instead of ngRoute, replaces $routeParams by $stateParams. In result when I change path I get error

Error: [$injector:unpr] Unknown provider: $$stateProvider <- $$state
http://errors.angularjs.org/1.2.16/$injector/unpr?p0=%24%24stateProvider%20%3C-%20%24%24state
    at http://localhost:9000/bower_components/angular/angular.js:78:12
    at http://localhost:9000/bower_components/angular/angular.js:3705:19
    at Object.getService [as get] (http://localhost:9000/bower_components/angular/angular.js:3832:39)
    at http://localhost:9000/bower_components/angular/angular.js:3710:45
    at getService (http://localhost:9000/bower_components/angular/angular.js:3832:39)
    at Object.invoke (http://localhost:9000/bower_components/angular/angular.js:3859:13)
    at $state.transition.resolved.then.$state.transition (http://localhost:9000/bower_components/angular-ui-router/release/angular-ui-router.js:2075:23)
    at wrappedCallback (http://localhost:9000/bower_components/angular/angular.js:11319:81)
    at http://localhost:9000/bower_components/angular/angular.js:11405:26
    at Scope.$eval (http://localhost:9000/bower_components/angular/angular.js:12412:28)

I am also getting the same error if I inject $state into any controller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions