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 the child component to raise the event
@Output() myevent1: EventEmitter;
onSubmit() {
console.log(this.myForm.value);
this.myevent1.emit();
}
I am able to raise the events for components which are already mentioned but not to components that are created using DCL. Please tell me how to raise the event in parent component from components created dynamically.
Here is the plunker demo i have worked till now http://plnkr.co/edit/2LJL4HxSc74XAyGmQMio?p=preview
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…