Aug 8, 2017 · 1 min read
How can I call a method in service(here loginService), before navigating or instead of navigating.
if (err.status == 401) {
localStorage.clear();
this.loginService.logout();
// this.router.navigate([‘/login’]);
}
How can I call a method in service(here loginService), before navigating or instead of navigating.
if (err.status == 401) {
localStorage.clear();
this.loginService.logout();
// this.router.navigate([‘/login’]);
}