From 35d7393eaf84e469983d5d8a27c96bf9630c62da Mon Sep 17 00:00:00 2001 From: Vincent Ramiere Date: Tue, 15 Feb 2022 15:30:33 +0100 Subject: [PATCH] fusion apres trompage --- src/app/app.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1768ea4..adcaf0e 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,4 +1,5 @@ import { Component } from '@angular/core'; +import { NavigationEnd, Router } from '@angular/router'; @Component({ selector: 'app-root', @@ -7,4 +8,12 @@ import { Component } from '@angular/core'; }) export class AppComponent { title = 'simpleat'; + constructor(private router:Router){ + this.router.events.subscribe(e=>{ + //console.log(e); + if(e instanceof NavigationEnd){ + console.log(e.url) + } + }) + } }