【发布时间】:2017-02-24 16:01:52
【问题描述】:
我将 angular2-modal 用于模态警报。我只想从模态中获取确认事件。我怎样才能得到它?
【问题讨论】:
-
有很多方法可以做到这一点。你试过搜索它吗?如果您提供有关您的问题的更多背景信息也会很棒
-
我正在使用 shlomiassaf/angular2-modal。这是链接您可以查看此 plnkr。在 plukr 中,您可以看到 custom-modal-sample.ts 文件。请看这个函数,onKeyUp(value)。在此函数中,如果用户输入 5,则模态框将关闭。我想在 app.component.ts 中获取事件。清理有用吗?
-
这很有帮助。能否在custom-modal-sample.ts中添加关闭按钮并通过点击app.component.ts中的按钮获取事件?
-
@yurzui,我只想知道app.component,ts中点击了哪个按钮。有什么办法吗?