I am using Components and service Component :
servers:{Name : string , Id:number }[]=[];
ngOnInit() {
this.Id = this.route.snapshot.params['id'];
}
Service :
server_detail=[{Name : 'production',Id : 1},
{Name :'Attendance', Id : 2}];
I am getting Id from the route and want to fetch server name corresponding to that server Id.