In Angular 2, is there a better way to control browser back. Ex: when click on back, show confirm dialog box, if confirmed redirect to page X, otherwise stay in same page.
Using location.onPopState() we cannot have a complete control on browser back as it will eventually do the back redirect.
Can above behavior be achieved using authguard, canActivate of angular2 routing?