A route guard helps determine if a particular action can be taken against a route. They are classes that implement a certain interface. The CanActivate and CanDeactivate interfaces can be used to implement the same type of logic that the removed events ionViewCanEnter and ionViewCanLeave did.
можно для конкретной страницы при настройке роутера указать CanDeactivate, и там уже реализовать логику, которая будет определять возможность деактивации страницы