Project

General

Profile

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

    
3
//Usage Example "<claim-entity [entity]="" [type]="" > </claim-entity>"
4

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

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

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

    
29
  constructor () {}
30

    
31
  ngOnInit() {
32

    
33
  }
34

    
35

    
36
}
(2-2/13)