[IONIC 4] Check page canDeactivate, o can close - routerLink

#1

I have a sidemenu , and I navigate the pages with a classic routerLink.

How I can check if I can close, and eventually prevent a closing, of a page in ionic4?

thank you