角度拦截器和对话框
因此,我们有一个 HTTP 拦截器,它将通过对话框提示用户(需要按下按钮)。
我的问题是,如果我愿意,如何允许我的 UI 组件与 Http 拦截器交互以关闭此对话框。我们目前正在捕获 BACK/FWD 按钮按下情况,并提示是否发现未保存的数据。同时,后端服务可能会通过对话框进行提示,并且用户只想返回到上一个页面。该对话框仍然存在,我找不到如何关闭它的解决方案。我已经添加了一个dialogRef到HTTP拦截器和一个close()方法来关闭它,但我没有看到任何人真正做这样的事情?
So we have an HTTP Interceptor that will prompt the user with a dialog (requiring a button press).
My question is how do I allow my UI Component to interface with the Http Interceptor to close this dialog if I wanted to. We are currently capturing BACK/FWD button presses and prompting if unsaved data is found. At the same time the back end service could have prompted with a dialog and the user simply wants to go back to his last page. That dialog is still up and I can't find a solution for how to close it. I've added a dialogRef to the HTTP inteceptor and a close() method to close it but I'm not seeing anyone who actually does anything like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论