Skip to content

Commit

Permalink
use real data
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelknoch committed Mar 25, 2016
1 parent 5e6db1c commit 235657c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/LocationComponent/location.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand All @@ -24,6 +24,7 @@ export class LocationComponent {
},
err => console.error(err)
);

}

}
4 changes: 3 additions & 1 deletion app/services/location.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

0 comments on commit 235657c

Please sign in to comment.