import { NgModule } from '@angular/core' ; import { BrowserModule } from '@angular/platform-browser' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ; import { HttpClientModule } from '@angular/common/http' ; import { Router , NavigationEnd } from '@angular/router' ; import { filter } from 'rxjs/operators' ; import { AppRoutingModule } from './app-routing.module' ; import { AppComponent } from './app.component' ; import { CoreModule } from './core' ; import { MatProgressSpinnerModule } from '@angular/material' ; @ NgModule ( { imports : [ BrowserModule , BrowserAnimationsModule , CoreModule , HttpClientModule , MatProgressSpinnerModule , AppRoutingModule ] , declarations : [ AppComponent ] , bootstrap : [ AppComponent ] } ) export class AppModule { constructor ( router ) { router . events . pipe ( filter ( evt => evt instanceof NavigationEnd ) ) . subscribe ( ( evt ) => { console . log ( `Navigated to ${ evt . url }` ) ; } ) ; } }