Project

General

Profile

1
import {Component, Input} from '@angular/core';
2
import {RouterHelper} from '../../../utils/routerHelper.class';
3

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

    
6
@Component({
7
  selector: 'publication-title',
8
  template: `
9
  <span class="publication-title">
10

    
11
     <span *ngIf="id" ><a  [queryParams]="routerHelper.createQueryParam(param,id)"  routerLinkActive="router-link-active" [routerLink]="path" >  {{title}}</a></span>
12
     <!--span *ngIf="url" class="uk-margin-small-left" ><a target="_blank" href="{{url}}" >
13
     (<span class="custom-external custom-icon" ></span>link)</a></span-->
14
   </span>
15
  `
16
})
17

    
18
export class PublicationTitleFormatter {
19
  @Input() title: string;
20
  @Input() url: string;
21
  @Input() id: string;
22
  @Input() param: string;
23
  @Input() path: string;
24
  public routerHelper:RouterHelper = new RouterHelper();
25
  constructor () {}
26

    
27
  ngOnInit() {
28

    
29
  }
30

    
31

    
32
}
(4-4/4)