I have an event in parent component. I want to call that event from the a child component created using DCL loadintolocation()
. I am following this logic in t
When you load the component, you can subscsribe to the event of the child from where you can call the parent function.
dcl.loadIntoLocation(ChildComponent, elementRef, 'child')
.then((newComponent) => {
newComponent.instance.event.subscribe(() => { .. call your parent ..});
})
UPDATE
see the plunker here: http://plnkr.co/edit/DNmtl6TG5s2dsEUlVTvw?p=preview