2018-02-12 14:38:30 +01:00
|
|
|
import {Meta} from '../../sharedComponents/metaService';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
export class OpenaireMetaTags{
|
|
|
|
|
|
|
|
constructor (private _meta: Meta ) {
|
|
|
|
}
|
|
|
|
|
|
|
|
updateDescription(description:string){
|
|
|
|
this._meta.updateMeta("description", description);
|
|
|
|
this._meta.updateProperty("og:description", description);
|
|
|
|
}
|
|
|
|
updateTitle(title:string){
|
|
|
|
var _prefix ="OpenAIRE | ";
|
|
|
|
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
|
|
|
|
this._meta.setTitle(_title );
|
|
|
|
this._meta.updateProperty("og:title",_title);
|
|
|
|
}
|
|
|
|
updateUrl(url:string){
|
|
|
|
this._meta.updateProperty("og:url", url);
|
|
|
|
}
|
|
|
|
}
|