From 6f2767c929d2da41e46f6f7e7ed6ce39e74bde4a Mon Sep 17 00:00:00 2001 From: Michael Knoch Date: Sat, 26 Mar 2016 01:18:41 +0100 Subject: [PATCH] show img --- app/LocationDetailComponent/locationdetail.component.ts | 4 +++- app/LocationDetailComponent/template.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 @@
- {{location}} +
\ No newline at end of file