New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub app be injected global service is an error #123
Comments
I guess it's because only import UpgradeModule and bootstrap ng1 in the portal, so the $injector service of NG1 can only be used in portal, for a deeper understanding, need to look at the mechanism of The simple solution is:
|
@why520crazy Your solution is work and it's well done, thank you very much! |
you are welcome! |
Hi Planet team
It's so sorry to bother you, but I'm confused by this library although these questions may not all come from it, and I have not found an answer. May i get some help.
I have a difficult case which was organized from an old angularjs and angular8, besides it's was also limited in the extensive refactoring to resolve in code of micronization.
Issue:
When I installed planet for it, it was up and running, I get this error message.
I have tested this way of writing under angularjs and angular8 code without planet library, it can work, but after using planet, the aforementioned error occurred.
After searching, it was found that the reasons for this error message are known as the following 6 types:
The first 5 have been excluded, I suspect it is the last, because of this Configuring Dependency Injection in Angular
But I am confused, whether a certain configuration of planet causes parameter type to fail?
Code Structure:
1. There is a common service exported from angularjs
(File name: angular1-root-module.js)
2. Inject into the class named Angular1InjectorService through the factory provider and depend on angularjs's $injector
3. Then inject into the common AppBaseService
4. Then the service of the sub app inherits AppBaseService, and obtains the method that exists in angularjs
5. portal root planet config
6. sub app1 main config
Issue related resources:
EXCEPTION: Can't resolve all parameters
Uncaught Error: Can't resolve all parameters for
After upgrade Angular to v8: Can't resolve all parameters for Component:
Intact issue code:
Stackblitz
Github
hope you could give me solution, and thanks for your hospitable help
Sincerely planet user.
The text was updated successfully, but these errors were encountered: