angular-hybrid icon indicating copy to clipboard operation
angular-hybrid copied to clipboard

No provider for Injector!

Open devniz opened this issue 6 years ago • 6 comments

Following the instructions to setup a hybrid angular router between AngularJS 1.7.3 and Angular app, I'm getting this error:

 `Unhandled Promise rejection: StaticInjectorError(AppModule)[UpgradeModule -> Injector]: 
   StaticInjectorError(Platform: core)[UpgradeModule -> Injector]: 
   NullInjectorError: No provider for Injector! ; Zone: <root> ; Task: Promise.then ; Value: Error: 
   StaticInjectorError(AppModule)[UpgradeModule -> Injector]: 
   StaticInjectorError(Platform: core)[UpgradeModule -> Injector]: 
   NullInjectorError: No provider for Injector!`

devniz avatar Aug 23 '18 16:08 devniz

  StaticInjectorError(Platform: core)[UIView -> UIRouter]: 
    NullInjectorError: No provider for UIRouter!
    at NullInjector.push.../../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8894)
    at resolveToken (core.js:9139)
    at tryResolveToken (core.js:9083)
    at StaticInjector.push.../../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980)
    at resolveToken (core.js:9139)
    at tryResolveToken (core.js:9083)
    at StaticInjector.push.../../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980)
    at resolveNgModuleDep (core.js:21120)
    at NgModuleRef_.push.../../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21809)
    at resolveDep (core.js:22180)```

kushwahashiv avatar Mar 25 '19 23:03 kushwahashiv

@kushwahashiv Hi Did you find any solution for this? I have been stuck in the same issue for 2 days. Thanks

subramanya4shenoy avatar Jun 14 '19 10:06 subramanya4shenoy

@subramanya4shenoy you can look at a hybrid example I built https://github.com/kushwahashiv/ng-hybrid

kushwahashiv avatar Jun 15 '19 16:06 kushwahashiv

any update pls

Js4Life avatar Mar 11 '20 06:03 Js4Life

Hey! I was not able to fix this. But we cam o now that one of our dependency (3rd party) had a circular deepndency. So we did a work arround by using the the 3rd party dependency locally and fixing the issue.

Generally, this is caused by circular dependency. Just try to segregate the component which is causing it and then take action.

All the best

On Wed, 11 Mar 2020, 12:00 pm Raghavendra M, [email protected] wrote:

any update pls

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ui-router/angular-hybrid/issues/189?email_source=notifications&email_token=ABIHC5JDL2CG53BPX7VJRTDRG4VYNA5CNFSM4FRHOY5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOOJYYQ#issuecomment-597466210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIHC5IXMT6OLNFO4LZBVSTRG4VYNANCNFSM4FRHOY5A .

subramanya4shenoy avatar Mar 11 '20 06:03 subramanya4shenoy

"No provider for UIRouter" might be not loading before bootstrapping

Js4Life avatar Mar 11 '20 08:03 Js4Life

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This does not mean that the issue is invalid. Valid issues may be reopened. Thank you for your contributions.

stale[bot] avatar Nov 12 '22 11:11 stale[bot]