각도로 NavigationStart를 중지 할 수 있습니까? 사용자가 경로를 변경하려고하면 사용자 지정 확인 모달을 묻는 중입니다.각도 정지 라우터 NavigationStart
constructor(private router: Router) {
if(val instanceof NavigationStart){
//prompt the confirmation modal and stop NavigationStart or at least
make it wait until user performs any action
}
}
당신은 경로를 방지 할 수
https://angular.io/api/router/CanDeactivate –
로 해결되었다 나는 멋진이 사용 canDeactive –
@AkashAgrawal 해결 할 수 있었다 답변을 조정했다면 동의하십시오. – Baconbeastnz