There is a case, if I get Unauthorized Error(401), it should redirect the Login page which I have defined in my interceptor to handle this error. After login, it should redirect the previous page where I got the 401 error.
I have followed this tutorial, quite helpful to me: http://jasonwatmore.com/post/2016/12/08/angular-2-redirect-to-previous-url-after-login-with-auth-guard.
But in the above tutorial, he didn't mention about redirection to login. So I have a question now, where should I store the route before the redirection to login. According to my knowledge, we cannot use the activatedRoute.snapshot in my interceptor.
Thanks in advance for helping.