官术网_书友最值得收藏!

Providers

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 {}
主站蜘蛛池模板: 河南省| 卓尼县| 洱源县| 衢州市| 阳原县| 星座| 遵义县| 洪湖市| 长治市| 秦安县| 衡东县| 上饶县| 霍城县| 淮滨县| 北宁市| 乐业县| 诸城市| 墨脱县| 徐水县| 道孚县| 保德县| 汝州市| 石屏县| 阿克苏市| 武安市| 灯塔市| 浦江县| 固始县| 永嘉县| 太仆寺旗| 成安县| 盐池县| 琼中| 台湾省| 寿阳县| 乐亭县| 迁安市| 聂荣县| 黄龙县| 龙陵县| 乡城县|