Skip to main content

Posts

Showing posts with the label How To Get Client IP Address and Client Browser In Angular 4 and 5?

How To Get Client IP Address and Client Browser In Angular?

Get Client IP Address Angular 4 and 5 - To  Get Client IP Address in Angular 4 and 5, the  following Steps as given below – 1.       Create Service 2.       Used the Service in your components 3.       Result Create Service for Get IP Address – - my-user-serv.service.ts import { Injectable } from '@angular/core' ; import { HttpClient , HttpErrorResponse   } from '@angular/common/http' ; import { Observable } from 'rxjs/Observable' ; import 'rxjs/add/observable/merge' ; import 'rxjs/add/operator/map' ; @ Injectable () export class MyUserServService {   constructor ( private http : HttpClient ) { }   //Get IP Adress using http://freegeoip.net/json/?callback   getIpAddress () {       return this . http             . get ( 'http://freegeoip.net/js...