import { Component , OnInit } from '@angular/core' ; import { ActivatedRoute } from '@angular/router' ; import { PageTitleService } from '../../services/page-title.service' ; @ Component ( { selector : 'dg-example-isolated-viewer' , templateUrl : './example.component.html' } ) export class ExampleIsolatedViewerComponent implements OnInit { public name : string ; constructor ( private route , private pageTitle ) { } ngOnInit ( ) { this . name = this . route . snapshot . paramMap . get ( 'name' ) ; this . pageTitle . title = `Example - ${ this . name }` ; } }