Project

General

Profile

1
import {Component, Input} from '@angular/core';
2

    
3
//Usage Example "<publication-title [title]="X" [url]="X" > </publication-title>"
4

    
5
@Component({
6
  selector: 'publication-title',
7
  template: `
8
  <div class="publication-title">
9
    <h5 *ngIf="url" ><a target="_blank" href="{{url}}" ><span class="uk-icon-external-link" ></span> {{title}}</a></h5>
10
    <h5 *ngIf="!url" >{{title}}</h5>
11
  </div>
12
  `
13
})
14

    
15
export class PublicationTitleFormatter {
16
  @Input() title: string[];
17
  @Input() url: string[];
18

    
19
  constructor () {}
20

    
21
  ngOnInit() {
22

    
23
  }
24

    
25

    
26
}
(4-4/4)