import { Component, Input } from '@angular/core'; import { Location } from '@angular/common'; import { Meta} from '../../sharedComponents/metaService'; import {ActivatedRoute} from '@angular/router'; @Component({ selector: 'community-error', template: `

There is no community selected!


If you are a community manager, click to manage from user menu.

` }) export class CommunityErrorPageComponent { public page: string; constructor (private _location: Location, private _meta: Meta,private route: ActivatedRoute) { this._meta.setTitle("OpenAIRE | Error page"); this.page = _location.path(true); //this.page = _router.url; //this.page = location.href; } ngOnInit() { this.route.queryParams.subscribe(data => { this.page = data['page']; if(!this.page){ this.page = this._location.path(true); } }); } }