Skip to content

Commit

Permalink
Fixed a scope issue in the detail compoenents' calls to the region se…
Browse files Browse the repository at this point in the history
…rvice and fixed a syntax error in the track details template.
  • Loading branch information
alancleary committed Nov 2, 2022
1 parent 41e11e8 commit ec90bb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/gene/components/details/gene/gene-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class GeneDetailComponent implements OnDestroy, OnInit {
.pipe(
takeUntil(this._destroy),
take(1))
.subscribe(this._processGeneLinks);
.subscribe((links) => this._processGeneLinks(links));

// get gene region details
this._geneService.getGenes([this.gene], this.source)
Expand All @@ -89,7 +89,7 @@ export class GeneDetailComponent implements OnDestroy, OnInit {
}),
takeUntil(this._destroy),
take(1))
.subscribe(this._processRegionLinks);
.subscribe((links) => this._processRegionLinks(links));
}

// private
Expand Down
10 changes: 6 additions & 4 deletions src/app/gene/components/details/track/track-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ import { Track } from '@gcv/gene/models';
<div class="details">
<h4>{{ track.genus[0] }}.{{ track.species }} - {{ track.name }}</h4>
<p><a [routerLink]="['/search', track.source, focus]" queryParamsHandling="merge">Search for similar contexts</a></p>
<li *ngFor="let link of regionLinks">
<a href="{{ link.href }}">{{ link.text }}</a>
</li>
<ul>
<li *ngFor="let link of regionLinks">
<a href="{{ link.href }}">{{ link.text }}</a>
</li>
</ul>
<p>Genes:</p>
<ul>
<li *ngFor="let gene of track.genes; let i = index">
Expand Down Expand Up @@ -82,7 +84,7 @@ export class TrackDetailComponent implements OnDestroy, OnInit {
}),
takeUntil(this._destroy),
take(1))
.subscribe(this._processRegionLinks);
.subscribe((links) => this._processRegionLinks(links));
}

private _processRegionLinks(links: any[]) {
Expand Down

0 comments on commit ec90bb9

Please sign in to comment.