Angular2服务订阅:参数隐式地有任何类型

问题描述:

任何人都可以帮助我。错误是Parameter'item'隐含有任何类型...请点击以下链接查看图像。Angular2服务订阅:参数隐式地有任何类型

Click to view the image

+0

发现...只好说唱我变 '项目' 与任何类型的... (项目:任意)=>此.changed(item) – Dhanush

试试这个: -

this.subscription = this.shared.getSelectedEleEmitter.subscribe(
(item:any) => { 
    this.changed = item 
}); 
+0

如果您满意我的回答,请检查我的答案。 –