How to subscribe asynchronously to matdialog service for candeactivate guard?
问题 I have implemented candeactivate guard using angular forms validation. If user clicks on an ngForm Field. and tries to navigate to different Tab, user will get a custom confirmation Popup, which will say "Discard Changes ? " and returns true or false. This is my form guard import { NgForm } from "@angular/forms"; import { ComponentCanDeactivate } from './component-can-deactivate'; export abstract class FormCanDeactivate extends ComponentCanDeactivate { abstract get form(): NgForm;