import { Component , OnDestroy , OnInit } from '@angular/core' ; import { ActivatedRoute } from '@angular/router' ; import { Subscription } from 'rxjs' ; @ Component ( { selector : 'app-pageheader-breadcrumb-page' , template : `<p id="page-content">{{ title }}</p>` , styles : [ `` ] } ) export class PageHeaderPageComponent implements OnInit , OnDestroy { title : string ; private _subscription : Subscription ; constructor ( public route ) { } ngOnInit ( ) { this . _subscription = this . route . data . subscribe ( data => this . title = data [ 'title' ] ) ; } ngOnDestroy ( ) { this . _subscription . unsubscribe ( ) ; } }