[Connect]: 1. resultLanding.service.ts: Enermaps details as string. 2. resultLanding.component.html: In enermaps details, show "words" starting with "http://" or "https://" as links.
This commit is contained in:
parent
18dd1379ad
commit
d7c7a18f51
|
@ -438,7 +438,13 @@
|
||||||
<ng-container *ngFor="let detail of enermapsDetails">
|
<ng-container *ngFor="let detail of enermapsDetails">
|
||||||
<li *ngIf="detail[0] && detail[1]">
|
<li *ngIf="detail[0] && detail[1]">
|
||||||
<span class="uk-text-muted">{{detail[0]}}: </span>
|
<span class="uk-text-muted">{{detail[0]}}: </span>
|
||||||
<span>{{detail[1]}}</span>
|
<span>
|
||||||
|
<ng-container *ngFor="let word of detail[1].split(' ')">
|
||||||
|
<ng-container *ngIf="!word.startsWith('http://') && !word.startsWith('https://')">{{word}} </ng-container>
|
||||||
|
<a *ngIf="word.startsWith('http://') || word.startsWith('https://')"
|
||||||
|
target="_blank" [href]="word">{{word}} </a>
|
||||||
|
</ng-container>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -501,7 +501,7 @@ export class ResultLandingService {
|
||||||
let keys = metadata ? Object.keys(metadata) : null;
|
let keys = metadata ? Object.keys(metadata) : null;
|
||||||
for(let key of keys) {
|
for(let key of keys) {
|
||||||
if(key != "shared_id" && key && metadata[key]) {
|
if(key != "shared_id" && key && metadata[key]) {
|
||||||
entries.push([key, metadata[key]]);
|
entries.push([key+"", metadata[key]+""]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return entries;
|
return entries;
|
||||||
|
|
Loading…
Reference in New Issue