Disable Angular Routing Event Logging

Is there a way to disable event logging from platform-browser.es5.jsin Angular 2/4? I want to be able to quickly read my own magazines, and Angular magazines drown out mine.

Angular router registration

+6
source share
1 answer

By default, routing events are not logged. As Maximus suggested, you have to add code somewhere to enable them. You just need to remove this code.

In my application, I enabled routing events here in the application's routing module:

    RouterModule.forRoot([
        { path: 'welcome', component: WelcomeComponent },
        { path: '', redirectTo: 'welcome', pathMatch: 'full' },
        { path: '**', component: PageNotFoundComponent }
    ], { enableTracing: true })

If you have such code, delete enableTracingor set it to false.

+12
source

All Articles