I'll cover providers and dependency injection in Chapter 5, Dependency Injection. Here I'd like to just note that NgModules can contain providers. And the providers of the imported modules are merged with the target module's providers, left to right, that is, if multiple imported modules define the same provider, the last module wins.
@NgModule({
providers: [
Repository
]
})
class TalksModule {}
@NgModule({
imports: [TalksModule]
})
class AppModule {}