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