Created
June 10, 2019 23:37
-
-
Save ivanalvarado/2866287938b69ef35551e7d9f30cde08 to your computer and use it in GitHub Desktop.
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
class MyApplication : Application() { | |
// ... | |
val component: AppComponent by lazy { | |
DaggerAppComponent.builder() | |
.application(this) | |
.build() | |
} | |
} | |
val Activity.injector get() = (application as MyApplication).component |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment