1
Angular有沒有辦法通過https
來檢測應用程序是否被訪問?我需要檢測,以便構建正確的url並將其傳遞到$ http服務中,並且傳遞http
將生成'the content must be served over HTTPS.'
錯誤。檢測應用程序是否通過SSL訪問?
Angular有沒有辦法通過https
來檢測應用程序是否被訪問?我需要檢測,以便構建正確的url並將其傳遞到$ http服務中,並且傳遞http
將生成'the content must be served over HTTPS.'
錯誤。檢測應用程序是否通過SSL訪問?
可以使用$window服務來訪問封裝窗口對象:
if($window.location.protocol == "https")
{
// whatever
}
哦,太好了,謝謝! – Zed 2014-12-04 15:29:09
不客氣! – mathieu 2014-12-04 15:45:15