鍍金池/ 問答/HTML/ angular4 中如何跳轉到外部網址,比如說跳轉到百度

angular4 中如何跳轉到外部網址,比如說跳轉到百度

angular4 中如何跳轉到外部網址,比如說跳轉到百度

回答
編輯回答
尤禮

window.open()

2017年1月13日 02:33
編輯回答
青裙

使用location.href

2018年9月21日 16:16
編輯回答
莓森

在頁面(html)上使用<a>標簽即可
在控制器或者服務里(ts)使用window.open或者window.location.href

2017年8月11日 22:08
編輯回答
終相守

看你是想在什么頁面上跳轉,window.open或者window.location.href 等都可以用用

2018年8月10日 12:37