Yogendra Sahu

Yogendra Sahu

  • 1.2k
  • 587
  • 138.1k

How to get MAC Address of system using Angular 4

May 24 2019 6:22 AM
I need MAC Address of current system using Angular
 
I tried this
 
run this command : npm install --save getmac
 
then in component file code is
 
getMACAddress() {
require('getmac').getMac(function (err, macAddress) {
if (err) throw err
console.log(macAddress)
alert(macAddress);
})
}
 
Is there any other way to fetch the MAC Address using Angular, TypeScript, JavaScript?

Answers (4)