Use this type of RouteController if you don't require a ViewModel but need the application component for injection. It includes the onCreateView and onInject methods, which are required to be overridden. You can override these methods yourself or let the Router do it during code generation. Override the onCreateView method if you need to pass parameters to the screen. Override onInject if you have your own method of injection. By default, it generates code like:
Where AppComponent is a shared application component
// Define path to the screen without parametersclassScreenPath: RouterPath// Connect the path and screen using RouteController@RouteabstractclassScreenRouteController: RouteControllerApp<ScreenPath, ScreenView>()
dataclassScreenPath(val title: String): RoutePath@RouteclassScreenRouteController: RouteControllerApp<ScreenPath, ScreenView>(){//@Inject optional if neededlateinitvar userData: UserData// injected by onInjectoverridefunonCreateView(path: ScreenPath): ScreenView=// logic of creating of the Screen and pass params to it// optionaloverridefunonInject(view: ScreenView, component: AppComponent) {// you custom code to inject dependencies }}