From 235657ce4203f93bbb1c88bbbc9b54f398c24e25 Mon Sep 17 00:00:00 2001 From: Michael Knoch Date: Sat, 26 Mar 2016 00:01:25 +0100 Subject: [PATCH] use real data --- app/LocationComponent/location.component.ts | 3 ++- app/services/location.service.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/LocationComponent/location.component.ts b/app/LocationComponent/location.component.ts index b6875f3..0a9f8ee 100644 --- a/app/LocationComponent/location.component.ts +++ b/app/LocationComponent/location.component.ts @@ -9,7 +9,7 @@ import {LocationService} from '../services/location.service'; export class LocationComponent { - locations:Locations; + locations; constructor(private _router:Router, private _routeParams:RouteParams, private locationService:LocationService) { @@ -24,6 +24,7 @@ export class LocationComponent { }, err => console.error(err) ); + } } \ No newline at end of file diff --git a/app/services/location.service.ts b/app/services/location.service.ts index 976c468..9976fc1 100644 --- a/app/services/location.service.ts +++ b/app/services/location.service.ts @@ -5,12 +5,14 @@ import 'rxjs/Rx'; @Injectable() export class LocationService { + http; + constructor(http:Http) { this.http = http; } getLocations() { - return this.http.get('mock.json') + return this.http.get('https://locator-app.com/api/v2/locations/nearby?long=9.169753789901733&lat=47.66868204997508&maxDistance=10000&limit=100000') .map(res => res.json()) } }