Skip to content

Commit

Permalink
show img
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelknoch committed Mar 26, 2016
1 parent 11ec791 commit 6f2767c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/LocationDetailComponent/locationdetail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ import {LocationService} from '../services/location.service';
export class LocationDetailComponent {

location;
img;

constructor(private _routeParams:RouteParams,
private locationService:LocationService) {

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)
Expand Down
2 changes: 1 addition & 1 deletion app/LocationDetailComponent/template.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="grid">
{{location}}
<img src="https://locator-app.com/{{img}}" class="img-responsive">
</div>

0 comments on commit 6f2767c

Please sign in to comment.