【问题标题】:How to warn the user about unsaved changes to the form before leaving the page? - angular 6如何在离开页面之前警告用户未保存的表单更改? - 角度 6
【发布时间】:2019-03-21 09:51:58
【问题描述】:

我正在使用 angular6,并想在用户更改屏幕之前警告用户表单中存在未保存的更改(更新)。 我的表单是使用 formBuilder 创建的。

【问题讨论】:

标签: angular warnings screen feedback


【解决方案1】:

您可以使用角度路线守卫来做到这一点。由于这是我建议的大话题,请查看以下内容:https://angular.io/guide/router#milestone-5-route-guards

【讨论】:

    猜你喜欢
    • 2019-06-18
    • 2016-06-25
    • 2017-12-30
    • 1970-01-01
    • 1970-01-01
    • 2020-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多