Looks like canDeactivate doesn't intercept window.location.replace. I have a service call in my component that replaces the current url:
window.location.replace('path');
I have a guard that looks like this but it is not called when 'window.location.replace' happens:
public canDeactivate(
component: MyFormComponent
): Observable<boolean> {
return of(false);
}
Is this something that I missed or maybe this is an angular limitation?