Last active
December 30, 2018 01:16
-
-
Save raghunandankavi2010/548d2e81dcd73172c7605cfba4bc120f to your computer and use it in GitHub Desktop.
Koin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val applicationModule = module { | |
single<RetrofitInterface>("Retrofit") { RetrofitDependency() } | |
single<raghu.me.myapplication.di.ListRepository>("ListRepository"){ ListRepositoryImpl(get("Retrofit")) } | |
// ListScreenViewModel | |
viewModel { ListScreenViewModel(get("ListRepository")) } | |
} | |
// constructor injection of repository in viewmodel and retrofit in repository |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment