I am developing a angular2 app. I need to redirect to the user from www.example.com to admin.example.com after a successful login. How can I acheive this in angular 2? Also how can I test it on my localhost ?
Any help would be appriciated
I am developing a angular2 app. I need to redirect to the user from www.example.com to admin.example.com after a successful login. How can I acheive this in angular 2? Also how can I test it on my localhost ?
Any help would be appriciated
You dont need angular to do what you need -
Simply do something like
window.location.href = "http://admin.example.com";
When you received the successfull login response.
Have a look here for further info: How to redirect to another webpage in JavaScript/jQuery?
I could have presented this in a jsfiddle for you, but seems like the service is broken (atleast for me) atm - as it wont give me a sharing URL.