import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'showTitle',
template: `
`
})
export class ShowTitleComponent {
@Input() title: { [key: string]: string };
@Input() iconClass:string;
sub: any;
constructor (private route: ActivatedRoute) {}
ngOnInit() {
this.sub = this.route.queryParams.subscribe(
params => {
console.info("onInit showTitle");
if(this.title['accessMode'] == undefined) {
this.title['accessMode'] = "";
}
}
);
}
ngOnDestroy() {
console.info("onDestroy showTitle");
this.sub.unsubscribe();
}
}