Project

General

Profile

1
import {Component, Input} from '@angular/core';
2
// import {PublicationTitleFormatter} from './publicationTitleFormatter.component';
3
// import {ProjectTitleFormatter} from './projectTitleFormatter.component';
4

    
5
//Usage Example "<claim-entity [entity]="" [type]="" > </claim-entity>"
6

    
7
//externalUrl
8
@Component({
9
  selector: 'claim-entity',
10
  template: `
11

    
12
  <div *ngIf="type == 'publication' || type == 'dataset'">
13
  <i>({{type}}) </i>
14
      <publication-title [title]="entity.title" [url]="entity.externalUrl" ></publication-title>
15
  </div>
16
  <div *ngIf="type == 'project'  ">
17
  <i>(Project)</i>
18
  <project-title [project]="entity"></project-title>
19
  </div>
20
  <div *ngIf="type == 'context'  ">
21
    <i>(Context)</i>
22
    <h5>{{entity.title}}</h5>
23
  </div>
24
  `
25
})
26

    
27
export class ClaimEntityFormatter {
28
  @Input() entity: string[];
29
  @Input() type: string;
30

    
31
  constructor () {}
32

    
33
  ngOnInit() {
34

    
35
  }
36

    
37

    
38
}
(1-1/4)