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 {NgModule} from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
|
|
||||||
import {CommunityErrorPageComponent } from './communityErrorPage.component';
|
import {CommunityErrorPageComponent} from './communityErrorPage.component';
|
||||||
import {MetaModule} from '../../sharedComponents/metaService.module';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, MetaModule
|
CommonModule, FormsModule
|
||||||
],
|
],
|
||||||
providers:[],
|
providers: [],
|
||||||
declarations: [
|
declarations: [
|
||||||
CommunityErrorPageComponent
|
CommunityErrorPageComponent
|
||||||
], exports:[CommunityErrorPageComponent]
|
],
|
||||||
|
exports: [
|
||||||
|
CommunityErrorPageComponent
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class CommunityErrorModule { }
|
export class CommunityErrorModule { }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, Input } from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import { Location } from '@angular/common';
|
import {Location} from '@angular/common';
|
||||||
import { Meta} from '../../sharedComponents/metaService';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {Title, Meta} from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'community-error',
|
selector: 'community-error',
|
||||||
|
@ -15,12 +15,9 @@ import {ActivatedRoute} from '@angular/router';
|
||||||
There is no community selected!
|
There is no community selected!
|
||||||
</h2>
|
</h2>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you are a community manager, click to manage from user menu.
|
If you are a community manager, click to manage from user menu.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,18 +28,22 @@ import {ActivatedRoute} from '@angular/router';
|
||||||
export class CommunityErrorPageComponent {
|
export class CommunityErrorPageComponent {
|
||||||
public page: string;
|
public page: string;
|
||||||
|
|
||||||
constructor (private _location: Location, private _meta: Meta,private route: ActivatedRoute) {
|
constructor (private _location: Location, private _meta: Meta,
|
||||||
this._meta.setTitle("OpenAIRE | Error page");
|
private _title: Title, private route: ActivatedRoute) {
|
||||||
|
|
||||||
|
var title = "OpenAIRE | Error page";
|
||||||
|
|
||||||
|
this._title.setTitle(title);
|
||||||
this.page = _location.path(true);
|
this.page = _location.path(true);
|
||||||
//this.page = _router.url;
|
//this.page = _router.url;
|
||||||
//this.page = location.href;
|
//this.page = location.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.queryParams.subscribe(data => {
|
this.route.queryParams.subscribe(data => {
|
||||||
|
|
||||||
|
|
||||||
this.page = data['page'];
|
this.page = data['page'];
|
||||||
if(!this.page){
|
|
||||||
|
if (!this.page) {
|
||||||
this.page = this._location.path(true);
|
this.page = this._location.path(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue