import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'showTitle',
template: `
[no title available]
`
})
export class ShowTitleComponent {
@Input() titleName: string;
@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");
}
);
}
ngOnDestroy() {
console.info("onDestroy showTitle");
this.sub.unsubscribe();
}
}