4
Answers

How to get MAC Address of system using Angular 4

Yogendra Sahu

Yogendra Sahu

5y
23.7k
1
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)