Property 'url' does not exist on type 'Event' for Angular2 NavigationEnd Event
You have to import { Event } from @angular/router;
. Try moving console into the if
block with condition.
this.subscription = this.router.events.subscribe((event:Event) => { if(event instanceof NavigationEnd ){ console.log(event.url); }});