import {Component, Input} from '@angular/core';
import {RouterHelper} from '../../../utils/routerHelper.class';
import {properties} from "../../../../../environments/environment";
//Usage Example " "
@Component({
selector: 'project-title',
template: `
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
{{project['funderName']}}
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
{{project['funderName']}}
Funder: {{project['funderName']}}
`
})
export class ProjectTitleFormatter {
@Input() project: any;
@Input() searchLink: string;
@Input() externalPortalUrl: string = null;
public url: string;
public routerHelper: RouterHelper = new RouterHelper();
public projectUrl = properties.searchLinkToProject.split('?')[0];
constructor() {
}
ngOnInit() {
this.url = this.searchLink + "?projectId=" + this.project["openaireId"];
}
}