import {Component, inject, signal} from '@angular/core'; import {ActivatedRoute, Router, RouterOutlet, NavigationEnd} from '@angular/router'; import {TopNavigation} from './shared/navigation/top-navigation/top-navigation'; import {FeedbackButton} from 'sae-lib/buttons/feedback-button/feedback-button'; import {filter} from 'rxjs/operators'; // import {SaeLib} from '@sae-lib/src/public-api'; @Component({ selector: 'app-root', imports: [RouterOutlet, TopNavigation, FeedbackButton], templateUrl: './app.html', styleUrl: './app.scss' }) export class App { public router = inject(Router); currentUrl: string = ''; protected readonly title = signal('implem'); constructor() { this.router.events.pipe( filter(event => event instanceof NavigationEnd) ).subscribe((event: any) => { this.currentUrl = event.urlAfterRedirects; console.log('Current URL:', this.currentUrl); }); } }