0

how to set static url in angular4 routing. this.router.navigate('https://xxxxxx.com/abx/xyz') like this , Which means i want to navigate to another website from my angular application.

Samudrala Ramu
  • 2,088
  • 1
  • 15
  • 36

2 Answers2

0

You can use window.location.href = '...';

Varun Sukheja
  • 6,170
  • 5
  • 51
  • 93
  • i added but i have a doubt, in my Project Redirect to is there so it'll override my window.location.href? – Samudrala Ramu just now – Samudrala Ramu Jul 24 '19 at 11:22
0

Use this code to redirect to external link

window.location.href = "url";
Tony Ngo
  • 19,166
  • 4
  • 38
  • 60