-
Notifications
You must be signed in to change notification settings - Fork 224
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
Make UserComponent be Sub Component of another one? #22
Comments
Did you figure this out? I'm interested in ways to create App component > Activity Component > Fragment Component relationship! |
@smithc42 Yes, I investigate again and again his post here: http://frogermcs.github.io/building-userscope-with-dagger2/, and then I apply similar way to my application. using For the relationship For more details, read this post: http://frogermcs.github.io/dependency-injection-with-dagger-2-custom-scopes/ if you are unable to build this in practices, share me the sample git and I can help. |
@IHNEL Thanks for the reply. I managed to set it up correctly but Dagger kept throwing:
I finally figured out I forgot to remove Cheers! |
the message from Dagger is very clear. you inject a class into somewhere but didn't define |
Thank you for your sharing this tutorial, it s very helpful
I am using your idea about User Scope to share signed user instance across it's sub components. And I want to make UserComponent itself be sub component of another one, like Base Activity Component.
My graph is
App component > base activity component > User Component > User Details Component (and many others)
The arrow stands for sub-component relationship.
In your example, you used SubComponent Builder to create User component, how can i make it extends all resource provide by App component and Base Activity component?
The text was updated successfully, but these errors were encountered: