import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; @Component({ selector: 'of-pages-probe', templateUrl: './probe-page.component.html', }) export class ProbePageComponent implements OnInit { tabs = undefined; constructor(private route: ActivatedRoute, private router: Router) { } ngOnInit() { // const id = this.router.url.split('probe/')[1].split('/')[0]; const id = '1'; this.tabs = [ { label: 'Info', path: '/probe/' + id, icon: 'fa-check' }, { label: 'Targets', path: '/probe/' + id + '/targets', icon: 'fa-check' }, { label: 'History', path: '/probe/' + id + '/history', icon: 'fa-check' }, ]; } }