Angular 5、获取实际网络IP地址
Angular 5, Getting actual network IP Address
嗨 Angular 2/5/6 大师,
我正在尝试 this 获取我机器的网络 IP 地址。但我得到的是“localhost”作为 IP 地址。例如,我期望这个结果类似于 10.0.5.21。
反正我能得到这个吗?
非常感谢你们!
阿塔尼斯泽拉图
尝试https://jsonip.com
this.http.get('https://jsonip.com/').subscribe(data => {
console.log(data);
});
嗨 Angular 2/5/6 大师,
我正在尝试 this 获取我机器的网络 IP 地址。但我得到的是“localhost”作为 IP 地址。例如,我期望这个结果类似于 10.0.5.21。
反正我能得到这个吗?
非常感谢你们!
阿塔尼斯泽拉图
尝试https://jsonip.com
this.http.get('https://jsonip.com/').subscribe(data => {
console.log(data);
});