import {Component, Input} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import { Router, ActivatedRoute} from '@angular/router'; import {PiwikService} from '../../utils/piwik/piwik.service'; import{EnvProperties} from '../../utils/properties/env-properties'; import { Meta} from '../../sharedComponents/metaService'; @Component({ selector: 'deposit-by-subject', template: `

Or search for domain specific repositories

` }) export class DepositBySubjectComponent { @Input() subjectKeyword: string=''; @Input() piwikSiteId = null; properties:EnvProperties; constructor (private _router: Router,private route: ActivatedRoute, private _meta: Meta, private _piwikService:PiwikService) { } ngOnInit() { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; this._meta.setTitle("Deposit by Subjects" ); this._meta.updateProperty("og:title","Deposit by subjects"); this._meta.updateProperty("og:url", data.envSpecific.baseLink+this._router.url); this._meta.updateMeta("description", "Openaire, repositories, open access, content provider, compatibility, organization, deposit by subject"); this._meta.updateProperty("og:description", "Openaire, repositories, open access, content provider, compatibility, organization, deposit by subject"); if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ this._piwikService.trackView(this.properties, "Deposit by subjects" , this.piwikSiteId).subscribe(); } }); } public search() { this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "subject": this.subjectKeyword } } ); } }