【发布时间】:2019-09-03 18:06:57
【问题描述】:
我想使用 Angular 7 中的路由器链接重定向到另一个链接,但 localhost:4200/dashboard 被附加到我要重定向到的链接。
<a [routerLink]="https://google.com">Google</a>
当我点击 Google 时,它应该重定向到 https://google.com 但是 正在调用 localhost:4200/dashboard/https://google.com。
【问题讨论】:
-
如果您要重定向到外部链接,请使用
href="https://google.com"
标签: angular angular-ui-router angular7-router