Angular2使用QueryList,父注入子错误:Can';无法解析的所有参数

Angular2使用QueryList,父注入子错误:Can';无法解析的所有参数,angular,Angular,在父母中 @ContentChildren(UiselectItemComponent) items: QueryList<UiselectItemComponent>; 我遇到错误:无法解析UiselectItemComponent:(?)的所有参数 有人能告诉我问题出在哪里吗?你能展示更多的代码吗?您可能会在构造函数中使用的组件之后声明UiselectComponent,您可以尝试使用forwardref或更改应用程序结构您的意思是什么?请参阅console。我在那里使用了In

在父母中

@ContentChildren(UiselectItemComponent) items: QueryList<UiselectItemComponent>;
我遇到错误:无法解析UiselectItemComponent:(?)的所有参数


有人能告诉我问题出在哪里吗?

你能展示更多的代码吗?您可能会在构造函数中使用的组件之后声明UiselectComponent,您可以尝试使用forwardref或更改应用程序结构
您的意思是什么?
请参阅console。我在那里使用了
Inject+forwardRef
@Whisher,这可能会有所帮助
constructor(private uiselect: UiselectComponent) {}