hottowel-angular-typescript icon indicating copy to clipboard operation
hottowel-angular-typescript copied to clipboard

Unknown provider: routerHelperProvider <- routerHelper

Open jtosey opened this issue 9 years ago • 6 comments

When I try this out-of-the-box, it runs okay, but this test fails:

[1APhantomJS 1.9.7 (Mac OS X 0.0.0) layout sidebar "before each" hook FAILED
    Error: [$injector:unpr] Unknown provider: routerHelperProvider <- routerHelper
    http://errors.angularjs.org/1.3.16/$injector/unpr?p0=routerHelperProvider%20%3C-%20routerHelper
        at ...project-path.../bower_components/angular/angular.js:4031
        at getService (...project-path.../bower_components/angular/angular.js:4178)
        at ...project-path.../bower_components/angular/angular.js:4036
        at getService (...project-path.../bower_components/angular/angular.js:4178)
        at ...project-path.../bower_components/bardjs/dist/bard.js:301
        at forEach (...project-path.../bower_components/angular/angular.js:326)
        at bardInject (...project-path.../bower_components/bardjs/dist/bard.js:315)
        at ...project-path.../src/client/app/layout/sidebar.controller.spec.js:13

If I comment out references to routerHelper in src/client/app/layout/sidebar.controller.spec.js, the tests pass fine. Is this method deprecated?

jtosey avatar Jul 01 '15 19:07 jtosey

I'm currently getting this issue when trying to run the core.route.spec tests.

chrissainty avatar Jul 20 '15 14:07 chrissainty

i get the same issue - any update on this?

setuk avatar Nov 16 '15 00:11 setuk

+1

samehelhawary avatar Nov 24 '15 20:11 samehelhawary

I think there was a breaking change to the application. The sidebar.controller.spec.js is trying to call routerHelp.configureStates. However, routerHelper has no function configureStates. Instead, configureStates exists in each of the other modules router configurations. I am speculating that this was the start of a refactor to only have one configureStates function, but the completed refactor did not get into the repo. Looking to complete the refactor.

boxertech avatar Dec 03 '15 13:12 boxertech

I think you need to add to project module app/blocks/router (router.module.js, router-helper.provider.js) My app module angular.module('app', [ 'blocks.router', 'ui.router', 'app.purchase.list' ]);

It's works for me.

dmitriyparasochka avatar Dec 28 '16 12:12 dmitriyparasochka

you might need too add 'app.core' on your module dependencies

aauronn avatar Apr 10 '17 21:04 aauronn