I have finished to update my App to Angular 6 (it was in 5.2 version).
I got an error syntax in :
import { Router, ActivatedRoute, NavigationEnd } fr
Activated Route wasnt giving me the url. So I tried this. P.S: event['url'] worked instead of event.url
import { filter } from 'rxjs/operators';
import { Router,NavigationEnd } from '@angular/router';
router.events.pipe(filter(event => event instanceof NavigationEnd))
.subscribe(event =>
{
this.currentRoute = event['url'];
console.log(this.currentRoute);
});