Use location.onPopState to the same in AppComponent
import { PlatformLocation } from ‘@angular/common’;
constructor(location: PlatformLocation, private router: Router) {
location.onPopState(() => {
console.log(‘pressed back in add!!!!!’);
//this.router.navigateByUrl(‘/multicomponent’);
//history.forward();
});
No comments:
Post a Comment