【发布时间】:2017-02-07 10:33:12
【问题描述】:
我有一个父组件,它在点击链接时打开一个新组件,这个新组件应该有一个关闭按钮,关闭时会向父组件发送关闭消息并自行销毁。
我们可以使用ngOnDestroy方法发送关闭消息,但是如何调用子组件的销毁。
<parent>
<child></child> //child to be opened on click but close
//event should be inside the child componenet
</parent>
如果我在这里有一些概念上的错误,请纠正我。谢谢
【问题讨论】:
标签: angular angular2-components