explore-services/sample-components/sampleComponent-rc6/src/app/common/publicationTitleFormatter.c...

27 lines
496 B
TypeScript

import {Component, Input} from '@angular/core';
//Usage Example "<publication-title [title]="X" [url]="X" > </publication-title>"
@Component({
selector: 'publication-title',
template: `
<div class="publication-title">
<h5 *ngIf="url" ><a target="_blank" href="{{url}}" >{{title}}</a></h5>
<h5 *ngIf="!url" >{{title}}</h5>
</div>
`
})
export class PublicationTitleFormatter {
@Input() title: string[];
@Input() url: string[];
constructor () {}
ngOnInit() {
}
}