I'm working on a front-end Angular application and I need to add a menu item that links to an external website.
For example, let's say my current website has this URL:
And I want the menu item in my app to lead to a completely different website like:
When I try setting up the redirection like this:
export const appRoutes: Route
{
redirectTo: 'https://stackoverflow.com/questions/ask'
}
It takes me to a URL of:
If I attempt something like this:
export const appRoutes: Route
{
path: 'https://stackoverflow.com/questions/ask'
}
It redirects me to a URL of:
I've experimented with the pathMatch parameter by trying 'full', 'prefix', and other settings.
Regardless of what I do, it seems difficult to simply redirect to a different URL without retaining any part of the current page's URL path.
Any suggestions?
Thanks!