diff --git a/app/LocationDetailComponent/locationdetail.component.ts b/app/LocationDetailComponent/locationdetail.component.ts index 20d4411..2297f0f 100644 --- a/app/LocationDetailComponent/locationdetail.component.ts +++ b/app/LocationDetailComponent/locationdetail.component.ts @@ -10,6 +10,7 @@ import {LocationService} from '../services/location.service'; export class LocationDetailComponent { location; + img; constructor(private _routeParams:RouteParams, private locationService:LocationService) { @@ -17,9 +18,10 @@ export class LocationDetailComponent { let id = this._routeParams.get('id'); console.info(id); - locationService.getLocation("56e82be612daae1a4fdc2cb4").subscribe( + locationService.getLocation(id).subscribe( data => { this.location = data; + this.img = this.location.images.xlarge; console.info(this.location); }, err => console.error(err) diff --git a/app/LocationDetailComponent/template.html b/app/LocationDetailComponent/template.html index 4b26f97..e02d920 100644 --- a/app/LocationDetailComponent/template.html +++ b/app/LocationDetailComponent/template.html @@ -1,3 +1,3 @@