import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { Output, Input, EventEmitter } from '@angular/core'; @Component({ selector: 'app-menu', templateUrl: './menu.component.html', styleUrls: ['./menu.component.css'] }) export class MenuComponent implements OnInit { @Output() didNavigation = new EventEmitter(); constructor(private router: Router) { } ngOnInit(): void { } goToAccueil(): void { this.router.navigate(['/']); this.didNavigation.emit(); } goToExperiencePro(): void { this.router.navigate(['/experience-pro']); this.didNavigation.emit(); } goToTechnologies(): void { this.router.navigate(['/technologies']); this.didNavigation.emit(); } goToBlog(): void { this.router.navigate(['/blog']); this.didNavigation.emit(); } downloadPdf(){ window.open( 'assets/MEHDI-BENNIS.pdf', '_blank' // <- This is what makes it open in a new window. ) } goToPokerPlanning(): void { this.router.navigate(['/pokerplanning']); this.didNavigation.emit(); } }