angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.56k stars 3.01k forks source link

ui-router can't resolve while using componentProvider #3751

Closed pete-mann closed 4 years ago

pete-mann commented 5 years ago

This issue tracker is for Bug Reports and Feature Requests only.

A request for help on this issue can be seen here on StackOverflow.

This is a (check one box):

My version of UI-Router is: 1.0.20 My version of Angularjs is 1.7.4

Bug Report

Current Behavior:

I have a need to use the componentProvider because states are loaded and registered using $stateRegistry.register({...}) with each state having a component defined in a JSON file.

Using AngularJS 1.7.4 and ui-router 1.0.20 while trying to resolve an object ffs in the component controller angularjs encounters an error Unknown provider: ffsProvider <- ffs. Is this expected behaviour, is there are workaround that allows me to inject these dependencies with resolve?

Expected Behavior:

I would expect that the ffs object is resolved and injected into the controller which works normally without using the componentProvider, however I believe I need to use the componentProvider. If this is expected behaviour I apologise, I just can't tell.

Link to Plunker that reproduces the issue:

This is a succinct version on the problem

stale[bot] commented 4 years ago

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.