Add google maps search to places
This commit is contained in:
parent
0e65d6e919
commit
3dece30145
@ -1,4 +1,4 @@
|
||||
<mat-card>
|
||||
<mat-card (click)="onClick($event)">
|
||||
<img [src]="place.img_url" alt="Image of {{place.place_name}}">
|
||||
<div class="footer">
|
||||
<span class="name">{{place.place_name}}</span>
|
||||
|
||||
@ -17,4 +17,8 @@ export class PlaceComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
onClick($event: MouseEvent) {
|
||||
$event.stopPropagation();
|
||||
window.open(`https://google.com/maps?q=${encodeURI(this.place.place_name)}`, '_blank');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user