简体   繁体   中英

Angular material dialog emitter

I have the following example: https://stackblitz.com/edit/simple-dialog-so-3z9big

May I ask you, why is the EventEmitter delete not emitted when called in subscribe?

I assume you're wondering why console.log('confirm action'); is not logged to the console.

Your output of the TestComponent is called @Output() delete .

In your AppComponent you reference (confirm) :

<test (confirm)="onConfirm()"></test>

Change that to delete :

<test (delete)="onConfirm()"></test>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM