Home > Software design >  Redirect to external Route in Angular
Redirect to external Route in Angular

Time:02-16

I am new to angular. And I am facing the issue to redirect to external route. I want to redirect from my angular app to other MVC application. Like: www.abc.com/angularapp to www.abc.com/mvcapp

Please help how to redirect to these kind of routes

CodePudding user response:

It's funny that you've tagged this with so many angular tags. This is a vanilla html / javascript question. You can navigate in the html with an <a></a> tag.

<a href="https://www.google.com"><button>Click Me!</button></a>

or in javascript with window.location.href

<button (click)="redirect()">Click Me!</button>
redirect() {
  window.location.href = 'https://www.google.com';
}

CodePudding user response:

you can use the following


<a href="https://www.facebook.com"><button>facebook</button></a>

  • Related