Add flight search button
This commit is contained in:
parent
71bbb1a3f1
commit
a5f102f99d
@ -7,6 +7,10 @@
|
||||
<span class="region-name">{{region.name}}</span>
|
||||
</div>
|
||||
<app-bookmark-button [region]="region"></app-bookmark-button>
|
||||
<a href="https://www.google.com/flights?q=flight+to+{{uriRegionName}}" mat-icon-button matTooltip="Search flights"
|
||||
rel="noopener" target="_blank">
|
||||
<mat-icon>flight_takeoff</mat-icon>
|
||||
</a>
|
||||
<app-share-button [region]="region"></app-share-button>
|
||||
</div>
|
||||
<p *ngIf="region.description" class="region-decsription">
|
||||
|
||||
@ -31,6 +31,8 @@ export class RegionDetailsComponent implements AfterViewInit {
|
||||
|
||||
/** Current region */
|
||||
region: Region;
|
||||
/** URI encoded region name */
|
||||
uriRegionName: string;
|
||||
/** Extend the description text */
|
||||
isDescExtended = false;
|
||||
|
||||
@ -42,6 +44,7 @@ export class RegionDetailsComponent implements AfterViewInit {
|
||||
switchMap((params: ParamMap) => this.ds.getRegion(parseInt(params.get('id'), 10)))
|
||||
).subscribe((region: Region) => {
|
||||
this.region = region;
|
||||
this.uriRegionName = encodeURI(this.region.name.toLowerCase());
|
||||
setTimeout(() => {
|
||||
if (this.container) {
|
||||
this.container.nativeElement.scrollIntoView();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user