2

Hi Angular 2/5/6 Gurus,

I was trying this, to get my machine's network IP address. But I got "localhost" as an IP address instead. I was expecting the result for this one to be like 10.0.5.21 for example.
Is there anyway I can get this?

Heaps of thanks to you guys!
Artanis Zeratul

Artanis Zeratul
  • 963
  • 2
  • 14
  • 40

1 Answers1

9

Try https://jsonip.com

this.http.get('https://jsonip.com/').subscribe(data => {
console.log(data);
});
Arghya Saha
  • 5,599
  • 4
  • 26
  • 48