src/app/services/ip.service.ts
Methods |
|
Async getLocalIpAddress |
getLocalIpAddress()
|
Defined in src/app/services/ip.service.ts:9
|
Returns :
Promise<string | undefined>
|
import { Injectable } from '@angular/core';
import { internalIpV4 } from 'internal-ip';
@Injectable({
providedIn: 'root'
})
export class IpService {
async getLocalIpAddress(): Promise<string | undefined> {
const ipAddress = await internalIpV4();
console.log(ipAddress)
return ipAddress;
}
}