[英]Angular material dialog emitter
I have the following example: https://stackblitz.com/edit/simple-dialog-so-3z9big 我有以下示例: https : //stackblitz.com/edit/simple-dialog-so-3z9big
May I ask you, why is the EventEmitter
delete
not emitted when called in subscribe? 我可以问您,为什么在订阅中调用时未发出
EventEmitter
delete
?
I assume you're wondering why console.log('confirm action');
我假设您想知道为什么
console.log('confirm action');
is not logged to the console. 未登录到控制台。
Your output of the TestComponent
is called @Output() delete
. 您的
TestComponent
输出称为@Output() delete
。
In your AppComponent you reference (confirm)
: 在您的AppComponent中,您引用
(confirm)
:
<test (confirm)="onConfirm()"></test>
Change that to delete
: 更改为
delete
:
<test (delete)="onConfirm()"></test>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.