import {Component, Input} from '@angular/core'; import {Location} from '@angular/common'; import {ActivatedRoute} from '@angular/router'; import {Title, Meta} from '@angular/platform-browser'; @Component({ selector: 'error', template: `

Bad karma: we can't find that page!


You asked for {{page}}, but despite our computers looking very hard, we could not find it. What happened ?

  • the link you clicked to arrive here has a typo in it
  • or somehow we removed that page, or gave it another name
  • or, quite unlikely for sure, maybe you typed it yourself and there was a little mistake ?
` }) export class ErrorPageComponent { public page: string; constructor (private _location: Location, private _meta: Meta, private _title: Title, private route: ActivatedRoute) { var title = "OpenAIRE | Error page"; this._meta.updateTag({content:title},"property='og:title'"); this._title.setTitle(title); 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); } }); } }