27 lines
557 B
TypeScript
27 lines
557 B
TypeScript
import {Component, Input} from '@angular/core';
|
|
|
|
//Usage Example "<publication-title [title]="X" [url]="X" > </publication-title>"
|
|
|
|
@Component({
|
|
selector: 'publication-title',
|
|
template: `
|
|
<span class="publication-title">
|
|
<span *ngIf="url" ><a target="_blank" href="{{url}}" ><span class="custom-external custom-icon" ></span> {{title}}</a></span>
|
|
<span *ngIf="!url" >{{title}}</span>
|
|
</span>
|
|
`
|
|
})
|
|
|
|
export class PublicationTitleFormatter {
|
|
@Input() title: string[];
|
|
@Input() url: string[];
|
|
|
|
constructor () {}
|
|
|
|
ngOnInit() {
|
|
|
|
}
|
|
|
|
|
|
}
|