Replace Meta service Import and use with Meta and Title from angular/platform-browser for communityErrorPage.component and communityError.module
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51752 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
46a7803fd9
commit
a44efefd78
|
@ -1,17 +1,19 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {CommunityErrorPageComponent } from './communityErrorPage.component';
|
||||
import {MetaModule} from '../../sharedComponents/metaService.module';
|
||||
import {CommunityErrorPageComponent} from './communityErrorPage.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, MetaModule
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
providers:[],
|
||||
providers: [],
|
||||
declarations: [
|
||||
CommunityErrorPageComponent
|
||||
], exports:[CommunityErrorPageComponent]
|
||||
],
|
||||
exports: [
|
||||
CommunityErrorPageComponent
|
||||
]
|
||||
})
|
||||
export class CommunityErrorModule { }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, Input } from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
import { Meta} from '../../sharedComponents/metaService';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
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: 'community-error',
|
||||
|
@ -15,12 +15,9 @@ import {ActivatedRoute} from '@angular/router';
|
|||
There is no community selected!
|
||||
</h2>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
If you are a community manager, click to manage from user menu.
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -31,18 +28,22 @@ import {ActivatedRoute} from '@angular/router';
|
|||
export class CommunityErrorPageComponent {
|
||||
public page: string;
|
||||
|
||||
constructor (private _location: Location, private _meta: Meta,private route: ActivatedRoute) {
|
||||
this._meta.setTitle("OpenAIRE | Error page");
|
||||
constructor (private _location: Location, private _meta: Meta,
|
||||
private _title: Title, private route: ActivatedRoute) {
|
||||
|
||||
var title = "OpenAIRE | Error page";
|
||||
|
||||
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){
|
||||
|
||||
if (!this.page) {
|
||||
this.page = this._location.path(true);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue