NiHao92
NiHao92

Reputation: 389

How to find the source of the error from browser console log?

I have a routing error in my web app, which is shown in the screenshot of my browser console. How do I tell from this error log in which file and at which line is this call?

enter image description here

Upvotes: 0

Views: 202

Answers (1)

DeborahK
DeborahK

Reputation: 60528

One way you can see what's happening with routing is to turn on route tracing. I have an example here: https://github.com/DeborahK/Angular-Routing

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

Upvotes: 1

Related Questions