@Ludohen answer is great, but in case you don't want to use instanceof
use the following
this.router.events.subscribe(event => {
if(event.constructor.name === "NavigationStart") {
// do something...
}
});
with this way you can check the current event name as a string and if the event occurred you can do what you planned your function to do.