import { Component , OnInit } from '@angular/core' ; import { ActivatedRoute , Router } from '@angular/router' ; @ Component ( { selector : 'app-breadcrumb' , templateUrl : './breadcrumb.component.html' , } ) export class BreadCrumbComponent implements OnInit { public currentTitle : string = '' ; public currentUrl : string = '' ; constructor ( private router , private route ) { this . currentUrl = router . url ; const children = router . config [ 0 ] . children ; } public ngOnInit ( ) { } public dashBoard ( ) { this . router . navigate ( [ './dashboard' ] ) ; } }