You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't want to declare all my app modules in main module, how can i inject specific screen module into compose function or navgraph?
Example:
NavHost(navController = navController, startDestination = "auth") {
composable("auth") { Here i want to inject my module, in fragment i did it like loadKoinModule(AuthModule)
AuthCompose(
viewModel = getViewModel(),
onPasswordRestore = { navController.navigate("password restore") }
)
}
composable("password restore") { Here i want to inject my module, in fragment i did it like loadKoinModule(PasswordRestoreModule)
PasswordResetCompose(viewModel = koinViewModel())
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I don't want to declare all my app modules in main module, how can i inject specific screen module into compose function or navgraph?
Example:
NavHost(navController = navController, startDestination = "auth") {
composable("auth") {
Here i want to inject my module, in fragment i did it like loadKoinModule(AuthModule)
AuthCompose(
viewModel = getViewModel(),
onPasswordRestore = { navController.navigate("password restore") }
)
}
composable("password restore") {
Here i want to inject my module, in fragment i did it like loadKoinModule(PasswordRestoreModule)
PasswordResetCompose(viewModel = koinViewModel())
}
}
Beta Was this translation helpful? Give feedback.
All reactions