0

On the internet, many suggest using window.location.hostname

But this code gives the domain name

What I'm interested is the system's hostname(In the command prompt, run hostname)

Is it possible to get the System's hostname in Angular 14?

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 10 '22 at 04:32

1 Answers1

1

That's not possible.

There is no JS API to access the system hostname, that would be a privacy nightmare.

Edit: Actually there was a way on Internet Explorer with ActiveX.

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134