From 2aaa0cf726447cabc9d460c009868f72d3a0881c Mon Sep 17 00:00:00 2001 From: "L. Henze" Date: Mon, 23 Sep 2019 12:43:00 -0400 Subject: [PATCH] Comcol Handle component --- .../comcol-page-handle.component.html | 2 +- .../comcol-page-handle.component.ts | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/app/shared/comcol-page-handle/comcol-page-handle.component.html b/src/app/shared/comcol-page-handle/comcol-page-handle.component.html index f20c4a2b66..bedd3ab4c0 100644 --- a/src/app/shared/comcol-page-handle/comcol-page-handle.component.html +++ b/src/app/shared/comcol-page-handle/comcol-page-handle.component.html @@ -1,4 +1,4 @@

{{ title | translate }}

- +
diff --git a/src/app/shared/comcol-page-handle/comcol-page-handle.component.ts b/src/app/shared/comcol-page-handle/comcol-page-handle.component.ts index f7cd81c935..7240ffaaec 100644 --- a/src/app/shared/comcol-page-handle/comcol-page-handle.component.ts +++ b/src/app/shared/comcol-page-handle/comcol-page-handle.component.ts @@ -1,13 +1,10 @@ - -import { Observable, of as observableOf, combineLatest as observableCombineLatest } from 'rxjs'; -import { Component, Input } from '@angular/core'; +import { Component, Input, Inject, Injectable } from '@angular/core'; import { GlobalConfig } from '../../../config/global-config.interface'; -import { Inject, Injectable } from '@angular/core'; import { GLOBAL_CONFIG } from '../../../config'; import { RESTURLCombiner } from '../../core/url-combiner/rest-url-combiner'; import { URLCombiner } from '../../core/url-combiner/url-combiner'; /** - * This component renders the value of "handle" + * This component builds a URL from the value of "handle" */ @Component({ @@ -22,7 +19,7 @@ export class ComcolPageHandleComponent { // Optional title @Input() title: string; - // The content to render. + // The value of "handle" @Input() content: string; constructor(@Inject(GLOBAL_CONFIG) private EnvConfig: GlobalConfig) { @@ -31,8 +28,7 @@ export class ComcolPageHandleComponent { return new RESTURLCombiner(this.EnvConfig, '/').toString(); } public getHandle(content: string): string { - const href = new URLCombiner(this.getRootHref(), '/handle/', this.content).toString(); - return href; + return new URLCombiner(this.getRootHref(), '/handle/', this.content).toString(); } }