【发布时间】:2017-07-06 16:16:06
【问题描述】:
我有以下顶级模块结构:
- 核心
- 共享
- 应用程序
共享模块内部是一个管道,需要使用核心模块中的服务。
目前 Angular 在尝试使用管道时抛出错误:inline template:null:null caused by: No provider for [object Object]!
我该怎么做呢?
核心模块由应用程序模块使用 .forRoot() 导入,并将所需的服务列为提供程序(在核心模块上)。
【问题讨论】:
-
你能重现吗?
标签: angular typescript dependency-injection pipe